我正试图在Windows 10上安装一个Python软件包。不幸的是,我的代理程序给我带来了麻烦。
我尝试过的事情:
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
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:8080 set HTTPS_PROXY=%HTTP_PROXY% set FTP_PROXY=%HTTP_PROXY%[global] proxy = "http://sam.s1:1234@proxy.det.nsw.edu.au:8080" trusted-host = pypi.python.org
它们都给了我类似的错误,例如:
Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x000002A6F091B080>: 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(<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x000002142813B128>, '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上完成这类工作)。
其他资料:
$ pip list设置一个值来更改[list]的输出。发布于 2017-11-06 04:42:01
我不知道代理程序,但是您可以从(PyPI)下载(PyPI),然后用pip安装它们。在大多数情况下,不需要从源代码编译,而Django绝对不需要编译。
您可以下载Django 这里,然后用pip install <path to downloaded package>安装它。
https://stackoverflow.com/questions/47128653
复制相似问题