python 3.7 + opencv报错Install packages failed: Installing packages: error occurred.

注意注意!!此文章正在修改中,时间紧迫的同志请跳过本文(防止浪费时间),之所以Po出来是希望和我有同样的问题的人能看到一些解决方法,但是由于我在准备讲论文,所以这个文章略显赘述,还未进行修改,但是最后的解决办法是正确的。

 

我在pycharm中下载opencv-contrib-python时未下载成功,则出现了以下报错

点开details如下图

python 3.7 + opencv报错Install packages failed: Installing packages: error occurred._第1张图片

最后一句You should consider upgrading via the 'python -m pip install --upgrade pip' command.意味你可以用"python -m pip install --upgrade pip"命令来更新

python 3.7 + opencv报错Install packages failed: Installing packages: error occurred._第2张图片

如上图更新到pip-20.2.4版本再试一下

python 3.7 + opencv报错Install packages failed: Installing packages: error occurred._第3张图片

然鹅,安装了几秒钟又报错了

让我i看看报错原因

python 3.7 + opencv报错Install packages failed: Installing packages: error occurred._第4张图片

python 3.7 + opencv报错Install packages failed: Installing packages: error occurred._第5张图片

显示ERROR: Could not find a version that satisfies the requirement opencvz-contrib-python (from versions: none)

有点死马当活马医,在命令行pip install opencv-contrib-python

显示需要4个多小时,哈哈哈,过了一会,立马报错Read timed out

现学现卖,遇到Read timed out报错,参考我的这篇博客https://blog.csdn.net/qq_41897154/article/details/109229027,利用命令“pip --default-timeout=1000 install -U opencv-contrib-python”

40M的包下起来原来是如此的慢,等着吧。。。。(20:20左右开始下载的)

下到百分之15左右半路阵亡,

python 3.7 + opencv报错Install packages failed: Installing packages: error occurred._第6张图片

我考虑把时间延长,试试,  pip --default-timeout=100000  install -U opencv-contrib-python,这个还是会报错的。

 

 

最后的最后,感谢我的lsw师兄,告诉我从清华源下载。速度可以说是十分快!!!哈哈哈

 

pip install 模块名 -i https://pypi.tuna.tsinghua.edu.cn/simple

例如:

pip install pytesseract -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install opencv-contrib-python -i https://pypi.tuna.tsinghua.edu.cn/simple

 

https://blog.csdn.net/qq_38523616/article/details/100558141

https://blog.csdn.net/lingchuxiao/article/details/107084283

 

你可能感兴趣的:(python,python,opencv)