本文针对是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
|