Traceback (most recent call last): File "D:/JetBrains/test/eeg_test/test.py", line 52, in <module> import matplotlib.pyplot as plt File "D:\JetBrains\pyEnv\python363\lib\site-packages\matplotlib\pyplot.py", line 115, in <module> _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup() File "D:\JetBrains\pyEnv\python363\lib\site-packages\matplotlib\backends\__init__.py", line 62, in pylab_setup [backend_name], 0) File "D:\JetBrains\PyCharm 2017.3\helpers\pycharm_matplotlib_backend\backend_interagg.py", line 17, in <module> verbose = matplotlib.verbose AttributeError: module 'matplotlib' has no attribute 'verbose'
方法一:
1.在pycharm中打開" File --> Settings --> Tools --> Python Scientific ",將"Show plots in toolwindow"去掉勾選,並應用。
2.[參考連接]https://stackoverflow.com/questions/49146678/module-matplotlib-has-no-attribute-verbose/49158765#49158765html
方法二:
1.根據報錯提示,將backend_interagg.py文件中的第17行「verbose = matplotlib.verbose」改成「verbose = matplotlib.Verbose」。
2.[參考鏈接]http://www.cnblogs.com/BlogOfMr-Leo/p/8546901.htmlpython
方法三:
1.回退matplotlib的版本,好比
pip uninstall matplotlib
pip install matplotlib==2.1.0編輯器