pip install pyqt5时报错:Preparing wheel metadata … error

人工智能144

问题描述

背景:在服务器上用conda搭建TensorFlow训练环境

在安装pyqt5时遇到了这个问题:
pip install pyqt5时报错:Preparing wheel metadata … error

; 解决尝试

是不是代码源出问题?

pip install pyqt5 -i https://pypi.douban.com/simple

仍然报错。

是不是pip版本过低?

查看现有版本:
pip --version

pip install pyqt5时报错:Preparing wheel metadata … error

参考https://www.jianshu.com/p/d784d147e442

查看更新后版本:

pip --version

pip install pyqt5时报错:Preparing wheel metadata … error

再次安装pyqt5

pip install pyqt5

pip install pyqt5时报错:Preparing wheel metadata … error
报错信息:

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

实际上是2个版本问题:

这里参考了https://blog.csdn.net/qq_43210957/article/details/103812433

学会了使用pip check查看包问题:

pip install pyqt5时报错:Preparing wheel metadata … error
找到问题,就可以直接三行代码搞定:

pip install --user pyqtwebengine==5.12
pip install --user pyqt5==5.12
pip install typed-ast

pip install pyqt5时报错:Preparing wheel metadata … error

查看安装的包:

pip list

pip install pyqt5时报错:Preparing wheel metadata … error

成功解决。

Original: https://blog.csdn.net/Xiao_Spring/article/details/114413575
Author: 黄元帅
Title: pip install pyqt5时报错:Preparing wheel metadata ... error