gpt4 book ai didi

Python - Pip 安装 - 代理错误 - 'Cannot connect to proxy.',OSError'

转载 作者:行者123 更新时间:2023-12-04 00:31:43 24 4
gpt4 key购买 nike

我想在企业 VM 中安装一些模块以创建一些 Python 脚本。我正在尝试使用带有代理的 PIP 来做到这一 pip 。我正在使用这个命令行:

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

要访问我的虚拟机,我有以下凭据:
  • 用户 : NAN/用户
  • 通过 :通过

  • 但我收到此错误:
    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

    我需要做什么才能获得 python 模块?

    最佳答案

    试试这样:

    set HTTP_PROXY=http://199.00.11.11:8080
    set HTTPS_PROXY=https://199.00.11.11:8080

    关于Python - Pip 安装 - 代理错误 - 'Cannot connect to proxy.',OSError',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49979354/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com