Python 3.4 Windows 8.1
已安装的模块:
matplotlib 1.3.1
的{{1}}
py 3.4
的{{1}}
numpy-MLK 1.9.0b1
的{{1}}
py 3.4
的{{1}}
dateutil 2.2
py 3.4
另外six 1.7.3
位于py 3.4
(安装文档说它需要)
tcl
tkinter
指出: msvcp71.dll
正在尝试使用
执行
C:\Windows\System32
但没有这样做。但目录中的import matplotlib.pyplot as plt
文件确实存在
Traceback (most recent call last):
File "<pyshell#284>", line 1, in <module>
import matplotlib.pyplot as plt
File "D:\Downloaded Programs\Python\lib\site-packages\matplotlib\pyplot.py", line 98, in <module>
_backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
File "D:\Downloaded Programs\Python\lib\site-packages\matplotlib\backends\__init__.py", line 28, in pylab_setup
globals(),locals(),[backend_name],0)
File "D:\Downloaded Programs\Python\lib\site-packages\matplotlib\backends\backend_tkagg.py", line 11, in <module>
import matplotlib.backends.tkagg as tkagg
File "D:\Downloaded Programs\Python\lib\site-packages\matplotlib\backends\tkagg.py", line 2, in <module>
from matplotlib.backends import _tkagg
ImportError: DLL load failed: The specified module could not be found.
为什么这不起作用?
答案 0 :(得分:0)
我知道这是一个旧线程,但我遇到了同样的问题,我找到了一个解决方案,所以我决定回答它。
通过查看matplotlib install documentation,它说:
For Python 3.5 the Visual C++ Redistributable for Visual Studio 2015 needs to be installed.
我从它的Microsoft website安装了它的64位版本(因为我使用64位Python 3.6.3,现在导入工作正常。
我希望将来可能会遇到同样问题的任何人。