Matplotlib导入失败

时间:2018-08-01 02:02:07

标签: python-2.7 matplotlib python-requests

使用2.7.12 Python | Anaconda 4.2.0(64位)

我在使用Matplotlib时没有任何问题,但是现在,我在运行时收到以下错误:

from mpl_toolkits.mplot3d import axes3d
import matplotlib.pyplot as plt

错误:

ImportError                               Traceback (most recent call last)
<ipython-input-30-98af018cf10b> in <module>()
----> 1 from mpl_toolkits.mplot3d import axes3d
      2 import matplotlib.pyplot as plt

c:\users\taner\anaconda2\lib\site-packages\mpl_toolkits\mplot3d\__init__.py in <module>()
      4 import six
      5 
----> 6 from .axes3d import Axes3D

c:\users\taner\anaconda2\lib\site-packages\mpl_toolkits\mplot3d\axes3d.py in <module>()
     22 import numpy as np
     23 
---> 24 import matplotlib.axes as maxes
     25 import matplotlib.cbook as cbook
     26 import matplotlib.collections as mcoll

c:\users\taner\anaconda2\lib\site-packages\matplotlib\axes\__init__.py in <module>()
      2                         unicode_literals)
      3 
----> 4 from ._subplots import *
      5 from ._axes import *

c:\users\taner\anaconda2\lib\site-packages\matplotlib\axes\_subplots.py in <module>()
      5 from six.moves import map
      6 
----> 7 from matplotlib.gridspec import GridSpec, SubplotSpec
      8 from matplotlib import docstring
      9 import matplotlib.artist as martist

c:\users\taner\anaconda2\lib\site-packages\matplotlib\gridspec.py in <module>()
     25 
     26 import matplotlib as mpl
---> 27 from matplotlib import _pylab_helpers, tight_layout, rcParams
     28 from matplotlib.transforms import Bbox
     29 import matplotlib._layoutbox as layoutbox

c:\users\taner\anaconda2\lib\site-packages\matplotlib\tight_layout.py in <module>()
     13 
     14 import matplotlib
---> 15 from matplotlib.transforms import TransformedBbox, Bbox
     16 
     17 from matplotlib.font_manager import FontProperties

c:\users\taner\anaconda2\lib\site-packages\matplotlib\transforms.py in <module>()
     49 
     50 from . import cbook
---> 51 from .path import Path
     52 
     53 DEBUG = False

c:\users\taner\anaconda2\lib\site-packages\matplotlib\path.py in <module>()
     20 
     21 from . import _path, rcParams
---> 22 from .cbook import (_to_unmasked_float_array, simple_linear_interpolation,
     23                     maxdict)
     24 

ImportError: cannot import name _to_unmasked_float_array

我先尝试pip uninstall matplotlib,然后再尝试pip install matplotlib,但无法解决问题。我真的不想为此问题重新安装Anaconda。任何帮助表示赞赏。

0 个答案:

没有答案