2017-06-19 58 views
4
>>> import matplotlib 
Traceback (most recent call last): 
    File "<stdin>", line 1, in <module> 
    File "/usr/local/lib/python2.7/dist-packages/matplotlib/__init__.py", line 123, in <module> 
    from . import cbook 
ImportError: cannot import name cbook 

我沒有找到解決方案,任何人都可以提供幫助嗎?ImportError:無法導入名稱cbook

+1

我可以使用來解決這個問題這個 https://stackoverflow.com/questions/46651581/importerror-cannot-import-name-cbook-when-using-pycharms-profiler – richar8086

回答

10

嘗試更新matplotlib

python -m pip install -U matplotlib 

2.嘗試重新安裝matplotlib

python -m pip uninstall matplotlib 
python -m pip install -U matplotlib 

是什麼下面的代碼片段打印到控制檯?

python -c "import matplotlib" 
相關問題