python pip设置代理

python pip设置代理

http://blog.csdn.net/dangerousroy/article/details/52924116

set HTTP_PROXY=proxy_ip:port
set HTTPS_PROXY=proxy_ip:port

原创 2016年10月25日 16:43:18

python 安装 urllib2 库时,

pip install  urllib2 报错如下,

 

  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 ( Forefront TMG requires authorizati
on to fulfill the request. Access to the Web Proxy filter is denied.  )',))': /s
imple/webscraping/
  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 ( Forefront TMG requires authorizati
on to fulfill the request. Access to the Web Proxy filter is denied.  )',))': /s
imple/webscraping/
  Could not find a version that satisfies the requirement webscraping (from vers
ions: )
No matching distribution found for webscraping

 

 

需设置代理,

 

set HTTP_PROXY=domain\username:password@proxy:port
set HTTPS_PROXY=domain\username:password@proxy:port

 

 

执行如下命令即可,
set HTTP_PROXY=icccuat\user_name:password@proxy_ip:port
set HTTPS_PROXY=icccuat\user_name:password@proxy_ip:port
pip install  urllib2

 

 

版权声明:本文为博主原创文章,未经博主允许不得转载。
 
posted @ 2018-01-12 19:46  sky20080101  阅读(1406)  评论(0)    收藏  举报