407 Windows 8.1中需要代理身份验证

时间:2017-05-16 17:41:10

标签: python windows numpy proxy

我正在尝试使用numpy在Windows 8.1中安装pip install numpy

它出现以下错误:

Collecting numpy
  Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connec
tion broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connectio
n failed: 407 Proxy Authentication Required',))': /simple/numpy/
  Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connec
tion broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connectio
n failed: 407 Proxy Authentication Required',))': /simple/numpy/
  Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connec
tion broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connectio
n failed: 407 Proxy Authentication Required',))': /simple/numpy/
  Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connec
tion broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connectio
n failed: 407 Proxy Authentication Required',))': /simple/numpy/
  Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connec
tion broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connectio
n failed: 407 Proxy Authentication Required',))': /simple/numpy/
  Could not find a version that satisfies the requirement numpy (from versions:
)
No matching distribution found for numpy

在引用this后,我在cmd中运行以下命令:

set proxy proxy-server="http=202.141.80.19:3128;https=202.141.80.19:3128" 

出于身份验证的目的,我也尝试过:

set proxy proxy-server="http=username:password@202.141.80.19:3128;https=username:password@202.141.80.19:3128" 

但它不起作用。

如何摆脱此错误?

1 个答案:

答案 0 :(得分:1)

经过多次尝试,这帮助我继续我的工作。

set HTTP_PROXY=http://proxy_userid:proxy_password@proxy_ip:proxy_port
set HTTPS_PROXY=http://proxy_userid:proxy_password@proxy_ip:proxy_port