Pycharm下载CV2/opencv-contrib-python报错

要安装CV2/opencv-contrib-python时报错下列信息

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

ERROR: No matching distribution found for opencv-contrib-python

查了多篇博客,目前看原因是对源的信赖问题,下载的时候加上信赖源的代码就可以了。

以下代码可以直接用:

pip install opencv-contrib-python -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

最后成功!

整个格式:pin install 要装的包 -i 要用的源 --trusted-host 源的域名部分

比如豆瓣:pip install opencv-contrib-python -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com

再把国内的多个源列一下:

清华:https://pypi.tuna.tsinghua.edu.cn/simple

阿里云:http://mirrors.aliyun.com/pypi/simple/

中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/

华中理工大学:http://pypi.hustunique.com/

山东理工大学:http://pypi.sdutlinux.org/ 

豆瓣:http://pypi.douban.com/simple/

猜你喜欢

转载自blog.csdn.net/qq_40016005/article/details/123916410
今日推荐