ERROR: Could not find a version that satisfies the requirement pyqt5 (from versions: none)
ERROR: No matching distribution found for pyqt5
在配置Pycharm时遇到此错误,主要是由于网速原因,使用下面两行代码即可下载Pyqt5 Tools和Pyqt5,注意运行顺序,先运行上面的,再运行下面的代码。
pip install pyqt5 -i https://mirrors.aliuyun.com/pypi/simple
pip install pyqt5-plugins -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
安装cv2遇到如下报错信息:
Failed to build opencv-python ERROR: Could not build wheels for opencv-python, which is required to install pyproject.toml-based projects
这是因为使用pip install opencv-python
命令安装的是最新版本,python3.6不支持。所以找一个python3.6支持的版本。如opencv-python==4.3.0.38
。代码如下:
pip install -i https://pypi.douban.com/simple/ pip install opencv-python==4.3.0.38
直接安装PIL包返回如下报错信息:
这是因为PIL较多用于2.7版本的Python中,到python3版本已经用Pillow代替PIL了。所以,我们应该去安装Pillow库,引入的命令方式也从:import image变为:from PIL import Image
运行命令:
pip3 install Pillow -i http://pypi.douban.com/simple --trusted-host pypi.douban.com