gpt4 book ai didi

python-2.7 - 导入 matplotlib._png 作为 _png 导入 : Error: DLL load failed: The specified module could not be found

转载 作者:行者123 更新时间:2023-12-03 02:23:37 28 4
gpt4 key购买 nike

我使用 Anaconda Python 发行版:Python 2.7 x64 和 Windows 7 SP1 x64 Ultimate。

当我import matplotlib.pyplot时,我得到ImportError:DLL加载失败:找不到指定的模块。。可能是什么问题?

完整错误堆栈:

Traceback (most recent call last):
File "C:\svn\hw4\code\test_con.py", line 1, in <module>
import matplotlib.pyplot
File "C:\Anaconda\lib\site-packages\matplotlib\pyplot.py", line 27, in <module>
import matplotlib.colorbar
File "C:\Anaconda\lib\site-packages\matplotlib\colorbar.py", line 34, in <module>
import matplotlib.collections as collections
File "C:\Anaconda\lib\site-packages\matplotlib\collections.py", line 27, in <module>
import matplotlib.backend_bases as backend_bases
File "C:\Anaconda\lib\site-packages\matplotlib\backend_bases.py", line 56, in <module>
import matplotlib.textpath as textpath
File "C:\Anaconda\lib\site-packages\matplotlib\textpath.py", line 22, in <module>
from matplotlib.mathtext import MathTextParser
File "C:\Anaconda\lib\site-packages\matplotlib\mathtext.py", line 63, in <module>
import matplotlib._png as _png
ImportError: DLL load failed: The specified module could not be found.

conda update -f numpyconda update -f libpngconda update -f matplotlib 没有帮助。

conda list matplotlib 的输出:

C:\Anaconda>conda list matplotlib
# packages in environment at C:\Anaconda:
#
matplotlib 1.4.3 np110py27_2
matplotlib-venn 0.11 <pip>

运行conda update --all后出现该问题。

最佳答案

我通过将 [Anaconda]/Library/bin 添加到我的 PATH 中,在 Windows 计算机上修复了此问题。

关于python-2.7 - 导入 matplotlib._png 作为 _png 导入 : Error: DLL load failed: The specified module could not be found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33459574/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com