在Windows 10(1809)的全新安装上干净安装python 3.7.3之后,我尝试一种简单的matplotlib演示代码:
c:\ pip install matplotlib
ON the python command prompt:
c:\ python
Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 21:26:53) [MSC v.1916 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import matplotlib
>>> matplotlib.use('TkAgg')
>>> from numpy import arange, sin, pi
>>> from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2TkAgg
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name 'NavigationToolbar2TkAgg' from 'matplotlib.backends.backend_tkagg' (C:\Program Files (x86)\Python37-32\lib\site-packages\matplotlib\backends\backend_tkagg.py)
我阅读了google针对这个众所周知的错误提供的所有文章。到目前为止,我尝试过
我不知道下一步该怎么做