Pip install 报错 Failed to establish a new connection: [Errno 111] Connection refused

本文分享了遇到pip命令报错Errno111时,如何通过排查发现是网络代理问题,并提供了解决方案: unset ALL_PROXY。适用于遇到同样问题的开发者。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 某天远程连接实验室的服务器做实验时需要安装一个包,当我一如既往熟练敲打出命令 pip install ....然后回车时发现居然报错了!!!!?看到这里的朋友,如果也有类似的问题出现,检查一下你的报错里的错误代码是不是Errno 111,不然不一定适用。根据报错可以大概知道是网络问题,但又可以访问网页,就是所有pip的命令都不能用。最后发现是网络代理问题。执行如下代码就解决了。

unset ALL_PROXY && unset all_proxy

C:\Users\刘浩博> pip install PyJWT Defaulting to user installation because normal site-packages is not writeable WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x0000013C814F1E80>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/pyjwt/ WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x0000013C814C5950>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/pyjwt/ WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x0000013C814C5BD0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/pyjwt/ WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x0000013C814C5E50>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/pyjwt/ WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x0000013C814C60D0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/pyjwt/ ERROR: Could not find a version that satisfies the requirement PyJWT (from versions: none) ERROR: No matching distribution found for PyJWT
最新发布
07-08
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值