首先说明下,本人在公司使用windows域账户代理上网,用pip在线安装package 返回ProxyError,类似Tunnel connection failed: 407 authenticationrequired

解决方案

# UNIX
export http_proxy=<user>:<password>@<proxy_ip_address>:<port>
export set https_proxy=<user>:<password>@<proxy_ip_address>:<port> # Windows
c:\> set http_proxy=<user>:<password>@<proxy_ip_address>:<port>
c:\> set https_proxy=<user>:<password>@<proxy_ip_address>:<port>

上面需要注意的是windows域账户需要使用类似set https_proxy=<hostname>\\<user>:<password>@<proxy_ip_address>:<port>hostname为域名

Ref

[http://blog.chinaunix.net/uid-608135-id-4340906.html]

05-11 11:24