pip会自动调用IE的代理设置,导致连接失败
networking - Python - Pip Install - Proxy Error - 'Cannot connect to proxy.', OSError' - Stack Overflow
https:// stackoverflow.com /questions/49979354/python-pip-install-proxy-error-cannot-connect-to-proxy-oserror
C:\Users\user>SET HTTPS_PROXY=https://user:pass@199.00.11.11:8080
C:\Users\user>SET PROXY=http://user:pass@199.00.11.11:8080
C:\Users\user>pip install datetime
Collecting datetime
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 ( Forefront TMG requires authorization to fulfill the request. Access to the Web Proxy filter is denied. )',))': /simple/datetime/
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 ( Forefront TMG requires authorization to fulfill the request. Access to the Web Proxy filter is denied. )',))': /simple/datetime/
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 ( Forefront TMG requires authorization to fulfill the request. Access to the Web Proxy filter is denied. )',))': /simple/datetime/
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 ( Forefront TMG requires authorization to fulfill the request. Access to the Web Proxy filter is denied. )',))': /simple/datetime/
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 ( Forefront TMG requires authorization to fulfill the request. Access to the Web Proxy filter is denied. )',))': /simple/datetime/
Could not find a version that satisfies the requirement datetime (from versions: )
No matching distribution found for datetime
- open 【IE】
- Press 【Alt+X】 and scroll down to 【Internet options】
- Click on the 【Connections】 tab
- Press the 【LAN settings】 button
- Uncheck the 【Proxy Server】
set http_proxy=http://username:password@proxyAddress:port
set https_proxy=https://username:password@proxyAddress:port