我尝试使用代理进行 pip install,代理设置是正确的,因为它适用于 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
Run Code Online (Sandbox Code Playgroud)
pip install packageName --proxy proxy_Server:portnumber
ex: pip install numpy --proxy https://myproxy@myserver.com:9090
Run Code Online (Sandbox Code Playgroud)
从/sf/answers/2352771991/看起来应该是
set https_proxy=<domain><username>:<password>@<proxy_server>:<port>
Run Code Online (Sandbox Code Playgroud)
所以端口而不是ip。