我尝试使用proxy点安装,代理设置正确,因为它适用于npm install。我尝试的是如下所示,但收到错误消息。任何想法都将受到欢迎!
set http_proxy=http://<username>:<password>@<proxy_server>:<port>
set https_proxy=https://<username>:<password>@<proxy_server>:<port>
pip install Flask
Collecting Flask
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Proxy Authentication Required'))': /simple/flask/
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Proxy Authentication Required'))': /simple/flask/
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Proxy Authentication Required'))': /simple/flask/
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Proxy Authentication Required'))': /simple/flask/
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Proxy Authentication Required'))': /simple/flask/
Could not find a version that satisfies the requirement Flask (from versions: )
No matching distribution found for Flask
答案 0 :(得分:1)
从https://stackoverflow.com/a/33611028/2653663看来应该是
set https_proxy=<domain><username>:<password>@<proxy_server>:<port>
所以端口而不是IP。
答案 1 :(得分:1)
pip install packageName --proxy proxy_Server:portnumber
ex: pip install numpy --proxy https://myproxy@myserver.com:9090
答案 2 :(得分:0)