>>> import matplotlib.pyplot as pltpython
File "/usr/local/lib/python3.6/tkinter/__init__.py", line 36, in <module>
import _tkinter # If this fails your Python may not be configured for Tk
ModuleNotFoundError: No module named '_tkinter'shell
缘由是:没有安装tkinter包ide
ubutun16下的解决方案是:this
sudo apt-get install tk8.6-devget
进入到python的安装目录下:it
make
class
sudo make installimport
而后输入python进入shell:module
import thinter #不报错表示安装成功!
im