我正在尝试运行一个使用matplotlib
来显示一些图形的程序。我已经安装了matplotlib
,但是当我尝试运行该程序时,我得到了:
File "C:\7cal\7cal.py", line 39, in <module>
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2TkAgg
File "C:\7cal\lib\site-packages\matplotlib\backends\backend_tkagg.py", line 13, in <module>
import matplotlib.backends.tkagg as tkagg
File "C:\7cal\lib\site-packages\matplotlib\backends\tkagg.py", line 9, in <module>
from matplotlib.backends import _tkagg
ImportError: DLL load failed: The specified module could not be found.
这些是代码中的import语句:
import matplotlib
matplotlib.use('TkAgg')
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2TkAgg
from matplotlib.figure import Figure
import matplotlib.animation as animation
from matplotlib import style
import matplotlib.pyplot as p
我尝试使用this question解决该问题,但没有成功。我不确定是否是因为我使用的是python 3.6.0。无论如何,对解决问题有什么想法?
谢谢!