pip安装失败,需要407代理身份验证

问题描述:

我正在尝试使用以下pip install命令,但是由于代理身份验证而导致的失败.我已经在RHEL7.x服务器中配置了代理.

I am trying to use the below pip install command, but its failing with Proxy authentication required issue. I have already configured my proxies inside my RHEL7.x Server.

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/

这是您应该尝试的第一件事:

This is the first thing you should try:

打开命令提示符(CMD).

Open the command prompt(CMD).

导出代理设置:

:\set http_proxy=http://username:password@proxyAddress:port

:\set https_proxy=https://username:password@proxyAddress:port

安装要安装的软件包:

:\pip install PackageName