下面是当我尝试使用Anaconda Python“将matplotlib.pyplot导入为plt”时会发生的情况。任何帮助将不胜感激。
查尔斯
--------------这是我试过的-------------
我有:C:\ Users \ Charles \ Anaconda; C:\ Users \ Charles \ Anaconda \ Scripts 在我的道路上。我做了:
C:\>conda update conda -f
Fetching package metadata: ....
Solving package specifications: ..............
Package plan for installation in environment C:\Users\Charles\Anaconda:
The following packages will be downloaded:
package | build
---------------------------|-----------------
conda-4.0.5 | py27_0 228 KB
The following packages will be UPDATED:
conda: 3.18.9-py27_0 --> 4.0.5-py27_0
Proceed ([y]/n)? y
Fetching packages ...
conda-4.0.5-py 100% |###############################| Time: 0:00:00 430.59 kB/s
[ COMPLETE ]|##################################################| 100%
Extracting packages ...
[ COMPLETE ]|##################################################| 100%
Unlinking packages ...
[ COMPLETE ]|##################################################| 100%
Linking packages ...
[ COMPLETE ]|##################################################| 100%
C:\>conda update anaconda -f
Fetching package metadata: ....
Solving package specifications: .........
Package plan for installation in environment C:\Users\Charles\Anaconda:
The following packages will be downloaded:
package | build
---------------------------|-----------------
anaconda-4.0.0 | np110py27_0 16 KB
The following packages will be UPDATED:
anaconda: 2.4.1-np110py27_0 --> 4.0.0-np110py27_0
Proceed ([y]/n)? y
Fetching packages ...
anaconda-4.0.0 100% |###############################| Time: 0:00:00 2.35 MB/s
[ COMPLETE ]|##################################################| 100%
Extracting packages ...
[ COMPLETE ]|##################################################| 100%
Unlinking packages ...
[ COMPLETE ]|##################################################| 100%
Linking packages ...
[ COMPLETE ]|##################################################| 100%
C:\>python
Python 2.7.10 |Anaconda 4.0.0 (64-bit)| (default, May 28 2015, 16:44:52) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://binstar.org
>>> import matplotlib.pyplot as plt
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\Charles\Anaconda\lib\site-packages\matplotlib\pyplot.py", line 29, in <module>
import matplotlib.colorbar
File "C:\Users\Charles\Anaconda\lib\site-packages\matplotlib\colorbar.py", line 34, in <module>
import matplotlib.collections as collections
File "C:\Users\Charles\Anaconda\lib\site-packages\matplotlib\collections.py", line 27, in <module>
import matplotlib.backend_bases as backend_bases
File "C:\Users\Charles\Anaconda\lib\site-packages\matplotlib\backend_bases.py", line 62, in <module>
import matplotlib.textpath as textpath
File "C:\Users\Charles\Anaconda\lib\site-packages\matplotlib\textpath.py", line 18, in <module>
from matplotlib.mathtext import MathTextParser
File "C:\Users\Charles\Anaconda\lib\site-packages\matplotlib\mathtext.py", line 60, in <module>
import matplotlib._png as _png
ImportError: DLL load failed: The specified module could not be found.
>>>
答案 0 :(得分:1)
请尝试此操作,然后再次尝试安装matplotlib。
conda install libpng