SaC*_*CvP 16 python proxy networking pip
我想在企业 VM 中安装一些模块以创建一些 Python 脚本。我正在尝试使用 PIP 和 Proxy 来做到这一点。我正在使用这个命令行:
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
Run Code Online (Sandbox Code Playgroud)
为了访问我的虚拟机,我有以下凭据:
但我收到此错误:
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
Run Code Online (Sandbox Code Playgroud)
我需要做什么才能获得 python 模块?
就我而言,这只是因为 \xe3\x80\x90VPN\xe3\x80\x91 软件修改了 \xe3\x80\x90System Proxy\xe3\x80\x91 配置 \xe3\x80\x90IE\xe3\x80 \x91 浏览器。
\n我这样修改回来:
\n\n\n\n
\n- 打开\xe3\x80\x90IE\xe3\x80\x91
\n- 按 \xe3\x80\x90Alt+X\xe3\x80\x91 并向下滚动到 \xe3\x80\x90Internet 选项\xe3\x80\x91
\n- 单击 \xe3\x80\x90Connections\xe3\x80\x91 选项卡
\n- 按\xe3\x80\x90LAN设置\xe3\x80\x91按钮
\n- 取消选中\xe3\x80\x90代理服务器\xe3\x80\x91
\n
我的问题就这样成功解决了。
\n尝试这样:
set HTTP_PROXY=http://199.00.11.11:8080
set HTTPS_PROXY=https://199.00.11.11:8080
Run Code Online (Sandbox Code Playgroud)
使用以下代码
pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org datetime
Run Code Online (Sandbox Code Playgroud)
您可以更改datetime任何您想要的包的名称。
| 归档时间: |
|
| 查看次数: |
97419 次 |
| 最近记录: |