I use the Anaconda Python distribution: Python 2.7 x64 with Windows 7 SP1 x64 Ultimate.
When I do import matplotlib.pyplot
I get ImportError: DLL load failed: The specified module could not be found.
. What could be the issue?
Full error stack:
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 numpy
, conda update -f libpng
, and conda update -f matplotlib
did not help.
Output of 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>
The issue appeared after running conda update --all
.
importerror: dll load failed: The specified module could not be found error occurs because of the incompatibilities of Microsoft Visual C++ (Visual studio) versions. The best way to fix this error (importerror: dll load failed) is to reinstall/ install the Microsoft Visual C++ distribution.
I fixed this on my Windows machine by adding [Anaconda]/Library/bin to my PATH.
I have had this problem as well. It seems to have cropped up in the last week or two. It seems like something in the scipy stack was compiled incorrectly. In the near term:
conda install anaconda
will roll your system back to a stable anaconda distribtution.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With