AttributeError:module' matplotlib'在导入时没有属性'详细'

时间:2018-03-07 22:47:46

标签: python matplotlib

import matplotlib.pyplot as plt
x = range(5)
y = range(5,11)
plt.plot(x,y)
plt.show()

然后我收到此错误消息:

Traceback (most recent call last):
  File "/Users/michaelrisling/PycharmProjects/untitled/test.py", line 1, in <module>
    import matplotlib.pyplot as plt
  File "/Users/michaelrisling/untitled/lib/python3.6/site-packages/matplotlib/pyplot.py", line 115, in <module>
    _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
  File "/Users/michaelrisling/untitled/lib/python3.6/site-packages/matplotlib/backends/__init__.py", line 62, in pylab_setup
    [backend_name], 0)
  File "/Applications/PyCharm.app/Contents/helpers/pycharm_matplotlib_backend/backend_interagg.py", line 17, in <module>
    verbose = matplotlib.verbose
AttributeError: module 'matplotlib' has no attribute 'verbose'

1 个答案:

答案 0 :(得分:2)

我也遇到同样的问题,我认为这个问题是MatplotLib的版本,我使用版本2.12来解决这个问题。