尽管matplotlib.artist位于\ site-packages

时间:2018-11-30 15:36:48

标签: python matplotlib anaconda

我正在一台临时PC上进行深度学习实验,但似乎存在一些路径或环境问题。我没有在代码中直接使用matplotlib,但是在尝试导入单独的模块时收到以下错误:

AttributeError                            Traceback (most recent call last)
<ipython-input-4-78e172347b91> in <module>
----> 1 from imageai.Detection import VideoObjectDetection
      2 import os
      3 execution_path = os.getcwd()
      4 detector = VideoObjectDetection()
      5 #  SqueezeNet, ResNet, InceptionV3 and DenseNet.

~\Anaconda3\lib\site-packages\imageai\Detection\__init__.py in <module>
      6 from imageai.Detection.keras_retinanet.utils.colors import label_color
      7 
----> 8 import matplotlib.pyplot as plt
      9 import matplotlib.image as pltimage
     10 import numpy as np

~\Anaconda3\lib\site-packages\matplotlib\__init__.py in <module>
   1109 with warnings.catch_warnings():
   1110     warnings.simplefilter("ignore", MatplotlibDeprecationWarning)
-> 1111     rcParamsOrig = RcParams(rcParams.copy())
   1112     rcParamsDefault = RcParams([(key, default) for key, (default, converter) in
   1113                                 defaultParams.items()

~\Anaconda3\lib\site-packages\matplotlib\__init__.py in __getitem__(self, key)
    889             val = dict.__getitem__(self, key)
    890             if val is rcsetup._auto_backend_sentinel:
--> 891                 from matplotlib import pyplot as plt
    892                 plt.switch_backend(rcsetup._auto_backend_sentinel)
    893 

~\Anaconda3\lib\site-packages\matplotlib\pyplot.py in <module>
     30 from cycler import cycler
     31 import matplotlib
---> 32 import matplotlib.colorbar
     33 import matplotlib.image
     34 from matplotlib import rcsetup, style

~\Anaconda3\lib\site-packages\matplotlib\colorbar.py in <module>
     26 
     27 import matplotlib as mpl
---> 28 import matplotlib.artist as martist
     29 import matplotlib.cbook as cbook
     30 import matplotlib.collections as collections

AttributeError: module 'matplotlib' has no attribute 'artist'

我检查了~\Anaconda3\lib\site-packages\matplotlib,一切似乎都很好。有人知道是什么原因造成的吗?我在这里找不到类似的问题。我还尝试了卸载和重新安装matplotlib的先前版本和最新版本,但均无济于事。预先感谢。

0 个答案:

没有答案