python开了代理后执行pip报错 (SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1129)'))
问题背景
windows环境下,开了代理以后,执行python的pip命令,或者其他任何与网络有关的命令,都报错:
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/urllib3/
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/urllib3/
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/urllib3/
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/urllib3/
解决方法
最简单的解决方法
关掉vpn
一劳永逸的方法
- 1). 关掉vpn
- 2). 安装就版本的urllib3
pip install urllib3==1.25.11
- 3). 打开vpn
搞定。
扫一扫关注微信公众号:耿直的IT男阿斌
聊一聊IT男眼中的世界