我正在尝试使用下面的pip install命令,但是它失败了代理身份验证需要问题。我已经在RHEL7.x服务器中配置了代理。
Command Used: `pip install --proxy https://'username:pwd'@proxy:host --upgrade pip`
日志:
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', error('Tunnel connection failed: 407 Proxy Authentication Required',))': /simple/pip/
Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', error('Tunnel connection failed: 407 Proxy Authentication Required',))': /simple/pip/
Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', error('Tunnel connection failed: 407 Proxy Authentication Required',))': /simple/pip/
Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', error('Tunnel connection failed: 407 Proxy Authentication Required',))': /simple/pip/
Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', error('Tunnel connection failed: 407 Proxy Authentication Required',))': /simple/pip/
答案 0 :(得分:7)
这是你应该尝试的第一件事:
打开命令提示符(CMD)。
导出代理设置:
:\set http_proxy=http://username:password@proxyAddress:port
:\set https_proxy=https://username:password@proxyAddress:port
安装要安装的软件包:
:\pip install PackageName
答案 1 :(得分:2)
Error 407
means that the authentication for the proxy is missing / wrong. Remove the '
from the username:pwd
part, i.e. use: pip install --proxy https://username:pwd@proxy:host
.
Try opening an internet connection from that server just prior to installing the Python package, as another option.
If this is not helping, try the the options given in the answers to the questions here, here and here.
答案 2 :(得分:1)
打开终端,然后执行:
export http_proxy=http://username:password@proxyAddress:port
export https_proxy=https://username:password@proxyAddress:port
我在Windows的git bash中尝试此操作。 在环境变量中没有密码的情况下,我找不到更好的答案。
您可以保存此代码,并在主目录中创建一个“ .bashrc”文件。
答案 3 :(得分:0)
通过使用我能够安装的以下命令,我也面临着同样的问题
com.company.app${BUNDLE_ID_SUFFIX}