无法安装urllib3,在使用pip之间有代理?

时间:2018-08-09 16:09:17

标签: python pip urllib urllib3

基本上,我正在尝试安装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 urllib3pip install urllib3都遇到相同的问题

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

非常感谢所有回复

1 个答案:

答案 0 :(得分:0)

您说您正在计算机上使用代理服务器。那可能是问题所在,这就是为什么您的错误消息指出它正在超时。需要告知pip有关代理的信息:

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

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