本文針對是Python3的環境遇到的問題,如果是Python2,卸載以及安裝相應的pyqt4版本,
遇到問題:

第一步:洗掉原有的pyqt
pip uninstall pyqt5
pip uninstall pyqt5-sip
第二步:重新安裝pyqt
由于第一次安裝pyqt,出現這個錯誤

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
spyder 5.0.4 requires pyqtwebengine<5.13, which is not installed.
spyder 5.0.4 requires pyqt5<5.13, but you have pyqt5 5.13.0 which is incompatible.
所以需要下載對應版本:
pip install PyQt5-5.12.3-5.12.10-cp35.cp36.cp37.cp38.cp39-none-win_amd64.whl
pip install PyQtWebEngine-5.12.1-5.12.10-cp35.cp36.cp37.cp38.cp39-none-win_amd64.whl
下載鏈接:
https://files.pythonhosted.org/packages/cb/c2/fc1632a893be36b515955c6b8830aabaa4b616c0078e8ad2a5c12465ea6a/PyQt5-5.12.3-5.12.10-cp35.cp36.cp37.cp38.cp39-none-win_amd64.whl
https://files.pythonhosted.org/packages/9b/0e/11413f9efeebbcfec3d44559e98523b3e420c3c99c79784154e79fc35838/PyQtWebEngine-5.12.1-5.12.10-cp35.cp36.cp37.cp38.cp39-none-win_amd64.whl
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/291868.html
標籤:python
