无法安装urllib3,中间使用pip代理?

2024-03-29 12:23:29 发布

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

基本上,我试图安装urllib3,但我遇到了以下错误:

 `C:\Python 3.7\Scripts>pip3.7.exe install urllib3
 Collecting urllib3
   Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None))
  after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection
 .VerifiedHTTPSConnection object at 0x03285170>, 'Connection to pypi.org timed ou
 t. (connect timeout=15)')': /simple/urllib3/
   Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None))
  after connection broken by      'ConnectTimeoutError(<pip._vendor.urllib3.connection
 .VerifiedHTTPSConnection object at 0x00D3E2B0>, 'Connection to pypi.org timed ou
 t. (connect timeout=15)')': /simple/urllib3/
   Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None))
  after connection broken by           'ConnectTimeoutError(<pip._vendor.urllib3.connection
 .VerifiedHTTPSConnection object at 0x032AB610>, 'Connection to pypi.org timed ou
 t. (connect timeout=15)')': /simple/urllib3/
  Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None))
  after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection
 .VerifiedHTTPSConnection object at 0x032AB670>, 'Connection to pypi.org timed ou
 t. (connect timeout=15)')': /simple/urllib3/
   Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None))
  after connection broken by      'ConnectTimeoutError(<pip._vendor.urllib3.connection
 .VerifiedHTTPSConnection object at 0x032AB5F0>, 'Connection to pypi.org timed ou
 t. (connect timeout=15)')': /simple/urllib3/


pip3.7.exe install urllib3
   Could not find a version that satisfies the requirement urllib3 (from versions: )
 No matching distribution found for urllib3

我试过:pip3.7.exe install urllib3和{}都有相同的问题

仅供参考:我位于代理后面。在

感谢所有回复


Tags: pipnonereadbystatusconnectconnectionredirect
1条回答
网友
1楼 · 发布于 2024-03-29 12:23:29

你说你在你的机器上使用代理服务器。这可能就是问题所在,这就是为什么你的错误消息说它超时了。pip需要告知代理:

$ pip3.7.exe install urllib3  proxy=http://name.of.proxy.com

此时,它将使用代理并完成其请求。不能保证它会找到什么,但是错误消息应该会更有帮助。在

相关问题 更多 >