使用pip在win7上安装django时遇到代理错误

2024-03-29 08:33:43 发布

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

我按照同事的方法用pip(python2.7)安装django,她成功了,我收到一条错误消息“访问Web代理过滤器被拒绝”。但是我可以用同一个域帐户通过代理来浏览网页。在

我在cmd中使用了以下命令:

set http_proxy=domain\username:password@proxyhost:port
set https_proxy=domain\username:password@proxyhost:port
pip install django

最后一段错误消息如下:

Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', error('Tunnel connection failed: 407 Proxy Authentication Required ( Forefront TMG requires authorization to fulfill the request. Access to the Web Proxy filter is denied. )',))': /simple/django/

我也尝试了follow cmd,得到了和上面一样的错误消息:

^{pr2}$

Tags: piptodjangocmdnoneweb消息代理