我正在尝试在Windows10上安装PythonPip包。不幸的是,我的代理人给我添麻烦了。在
我尝试过的事情:python -m pip install --proxy "http://sam.s1:1234@proxy.det.nsw.edu.au:8080"
python -m pip install --proxy http://sam.s1:1234@proxy.det.nsw.edu.au:8080
&;2。协议改为https
&;2。省略协议,例如:python -m pip install --proxy sam.s1:1234@proxy.det.nsw.edu.au:8080
set HTTP_PROXY=sam.s1:1234@proxy.det.nsw.edu.au:8080set HTTPS_PROXY=%HTTP_PROXY%set FTP_PROXY=%HTTP_PROXY%
按照步骤1到4中所述的相同方法编辑HTTP峎proxy env变量的代理地址。在
创建点滴文件位于%APP_DATA%/pip/,包含以下内容:
[global]
proxy = "http://sam.s1:1234@proxy.det.nsw.edu.au:8080"
trusted-host = pypi.python.org在中编辑代理地址点滴按照步骤1到4中所述的相同方式进行文件。在
它们都会给我类似的错误,比如:
Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', NewConnectionError(': Failed to establish a new connection: [Errno 11001] getaddrinfo failed',))': /simple/django/
以及
Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(, 'Connection to pypi.python.org timed out. (connect timeout=15)')': /simple/django/
以及
Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Proxy Authentication Required',))': /simple/django/
虽然一次性地解决如何通过代理下载包会很好,但是我会接受关于任何完全绕过代理的方法的说明,比如下载包和从源代码处编译(我通常使用Ubuntu,所以我不知道如何在Windows上做这类事情)。在
其他信息:代理是通过pac脚本配置的
我目前正在尝试安装的包是Django,但将来可能还会有其他包。在
我在安装python3.6.3时安装了pip(通过复选框,上面写着“doyouwantoinstallpip以及Python”)。在
我知道pip从.ini文件获取设置,因为我可以通过设置[list]的值来更改$ pip list的输出。在