问题:如题。
解决方法:
1. 重新安装,或降低版本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 可以。
参考 https://blog.csdn.net/u014734886/article/details/93036577
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
参考https://stackoverflow.com/que
stions/52346254/importerror-failed-to-import-any-qt-binding-python-tensorflow
3. 安装后仍出现2中的问题,应该是缺少PySide
解决方法:
安装PySide
python -m pip install -U PySide
4. 安装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...解决问题
如果出现问题ImportError: libX11.so.6: cannot open shared object file: No such file or directory,安装相应库,参考 https://blog.csdn.net/u014734886/article/details/93036577