python 3.7 + opencv報錯Install packages failed: Installing packages: error occurred.
注意注意!!此文章正在修改中,時間緊迫的同志請跳過本文(防止浪費時間),之所以Po出來是希望和我有同樣的問題的人能看到一些解決方法,但是由於我在準備講論文,所以這個文章略顯贅述,還未進行修改,但是最後的解決辦法是正確的。
我在pycharm中下載opencv-contrib-python時未下載成功,則出現了以下報錯
點開details如下圖
最後一句You should consider upgrading via the 'python -m pip install --upgrade pip' command.意味你可以用"python -m pip install --upgrade pip"
如上圖更新到pip-20.2.4版本再試一下
然鵝,安裝了幾秒鐘又報錯了
讓我i看看報錯原因
顯示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
40M的包下起來原來是如此的慢,等著吧。。。。(20:20左右開始下載的)
下到百分之15左右半路陣亡,
我考慮把時間延長,試試, 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