挂代理后pip install报错‘SSLError(SSLEOFError(8, ‘EOF occurred in violation of protocol (_ssl.c:

在挂了代理之后用pip下载库,出现报错,关了又恢复正常,不过要使用阿里,清华源,不然下载很慢

原因:

在网上搜了是由于新版本的pip内嵌了urlib3的包 而这个包之前(≤1.25.11)是只支持http协议的,而正好代理也是支持http协议,所以相安无事,但urlib3版本更新之后支持https了,而代理仍然只支持http协议,导致握手出现问题。(我是半桶水,大概是这个意思,具体可以看下面的参考链接)

解决方法:

修改环境变量

添加变量:HTTPS_PROXY
变量值:http://127.0.0.1:7890

在这里插入图片描述

前一部分 127.0.0.1是代理ip的意思
:后一部分7890 是端口

我觉得这一部分应该每个人都是一样的,下方链接博客里的ip和我的是一样的

在这里插入图片描述

只用修改环境变量HTTPS_PROXY的值就OK了

修改完环境变量记得重启电脑

参考链接:https://zhuanlan.zhihu.com/p/350015032

Could not fetch URL https://pypi.org/simple/pymysql/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pymysql/ (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1129)'))) - skipping Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1129)'))) - skipping WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1129)'))': /simple/pymysql/ WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1129)'))': /simple/pymysql/ WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1129)'))': /simple/pymysql/ WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1129)'))': /simple/pymysql/ WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1129)'))': /simple/pymysql/ ERROR: Could not find a version that satisfies the requirement pymysql (from versions: none) ERROR: No matching distribution found for pymysql
03-25
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值