pip安装生成警告:“NewConnectionError(”<pip.\u vendor.urllib3.connection.HTTPConnection对象位于…>

2024-05-17 15:38:11 发布

您现在位置:Python中文网/ 问答频道 /正文

我花了很多时间寻找是否有人已经有相同的问题,但我没有找到任何东西

有一段时间,每当我想安装带有pip的软件包时,我都会收到警告。安装工作在最后,但它需要更多的时间。警告包括重复5次相同的警告:

WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPConnection object at 0x105b71c50>: Failed to establish a new connection: [Errno 61] Connection refused')': /simple/mako/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPConnection object at 0x105b6c690>: Failed to establish a new connection: [Errno 61] Connection refused')': /simple/mako/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPConnection object at 0x105b6cb90>: Failed to establish a new connection: [Errno 61] Connection refused')': /simple/mako/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPConnection object at 0x105bb6f10>: Failed to establish a new connection: [Errno 61] Connection refused')': /simple/mako/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPConnection object at 0x105bb67d0>: Failed to establish a new connection: [Errno 61] Connection refused')': /simple/mako/

在这些警告之后,一切似乎都很正常,但我想删除它们以加快安装速度

如果你需要更多的信息,请不要犹豫问,我不知道我应该在哪里挖掘来解决这个问题,所以我不知道需要什么样的信息

非常感谢你的帮助


Tags: pipnonereadbystatusconnectconnectionredirect
3条回答

不适用于您的问题。但是对于在VPN上遇到这种行为的其他人,我在github pip存储库(https://github.com/pypa/pip/issues/7935)中发现了一个已解决的问题,解决方案是断开与VPN的连接。这对我的情况很有帮助,我重新连接到VPN(我正在使用Tunneblick),一切又恢复了平稳和快速

我能够将其安装为su。”sudo su',然后pip3安装sele

对于在conda环境中使用Ubuntu20的win10 wsl2的用户:

请先从conda中运行以下代码:

sudo apt-get update
sudo apt-get upgrade
sudo apt install python3-pip

然后激活任何conda环境,pip安装即可成功运行

相关问题 更多 >