pip install pyqt5时报错:Preparing wheel metadata ... error
问题描述
背景:在服务器上用conda搭建TensorFlow训练环境
在安装pyqt5时遇到了这个问题:
解决尝试
是不是代码源出问题?
pip install pyqt5 -i https://pypi.douban.com/simple
仍然报错。
是不是pip版本过低?
查看现有版本:pip --version

参考https://www.jianshu.com/p/d784d147e442
查看更新后版本:
pip --version

再次安装pyqt5
pip install pyqt5

报错信息:
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 3.3.6 requires pyqtwebengine<5.13; python_version >= “3”, which is not installed.
spyder 3.3.6 requires pyqt5<5.13; python_version >= “3”, but you have pyqt5 5.15.3 which is incompatible.
实际上是2个版本问题:
这里参考了https://blog.csdn.net/qq_43210957/article/details/103812433
学会了使用pip check查看包问题:

找到问题,就可以直接三行代码搞定:
pip install --user pyqtwebengine==5.12
pip install --user pyqt5==5.12
pip install typed-ast

查看安装的包:
pip list

成功解决。
AtomGit 是由开放原子开源基金会联合 CSDN 等生态伙伴共同推出的新一代开源与人工智能协作平台。平台坚持“开放、中立、公益”的理念,把代码托管、模型共享、数据集托管、智能体开发体验和算力服务整合在一起,为开发者提供从开发、训练到部署的一站式体验。
更多推荐



所有评论(0)