转载自:https://blog.csdn.net/someonelikesyou/article/details/104974528
问题:如题。
解决方法:
- 重新安装,或降低版本matplotlib
#重新安装
python -m pip uninstall matplotlib
python -m pip install --upgrade pip
python -m pip install matplotlib
#降低版本
python -m pip uninstall matplotlib
python -m pip --no-cache-dir install -U matplotlib==2.2.2
我的python版本3.6,重新安装毫无卵用, 安装2.2.2matplotlib 可以。
2. 出现新的问题:
ImportError: Matplotlib qt-based backends require an external PyQt4, PyQt5,
PySide or PySide2 package to be installed, but it was not found.
解决方法:
查看是否安装PyQt5
import PyQt5
如果不能import,则安装PyQt5
python -m pip install PyQt5
- 安装后仍出现2中的问题,应该是缺少PySide
- 解决方法:
安装PySide
python -m pip install -U PySide
- 安装PySide时报错:
Complete output (1 lines):
only these python versions are supported: [(2, 6), (2, 7), (3, 2), (3, 3), (3, 4)]
应该是PySide与python3.6或者PyQt5不兼容,em…
解决方法:
安装PySide2
python -m pip install -U PySide2
em…解决问题