linux安装opencv-python提示代理有问题

pip install opencv-python
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Your proxy appears to only use HTTP and not HTTPS, try changing your proxy URL to be HTTP. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#https-proxy-error-http-proxy', SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1002)')))': /simple/opencv-python/ 

ERROR: Could not find a version that satisfies the requirement opencv-python (from versions: none)                                 
ERROR: No matching distribution found for opencv-python   

意思是说代理有问题,只能用HTTP,不能用HTTPS,需要把代理改成http,可以根据提示访问连接查看解决方法,也可以按照下面方法:

先看下http和https的代理:

echo $http_proxy

输出:http://10.7.69.105:808

echo $https_proxy

输出:https://10.7.69.105:808

问题就在这里,https_proxy是https的,输入下面命令给他改成http

export https_proxy=http://10.7.69.105:808

然后重新下载,就OK了

pip install opencv-python
Collecting opencv-python
  Downloading opencv_python-4.9.0.80-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (62.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.2/62.2 MB 134.9 kB/s eta 0:00:00
Requirement already satisfied: numpy>=1.21.2 in ./anaconda3/lib/python3.11/site-packages (from opencv-python) (1.24.3)
Installing collected packages: opencv-python
Successfully installed opencv-python-4.9.0.80


 

  • 9
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值