在绘图的时候import matplotlib.pyplot as plt报错:ImportError: No module named '_tkinter', please install the python-tk package

 在绘图的时候import matplotlib.pyplot as plt报错:ImportError: No module named '_tkinter', please install the python-tk package

报错原因:没有安装Tkinter

解决方法:sudo apt-get install python-tk 
切记,不要用pip解决,pip不能解决问题

猜你喜欢

转载自www.cnblogs.com/laowangxieboke/p/10775956.html
今日推荐