[英]SSL Issue while installing any package using pip behind the proxy
Facing issues while installing tensorflow or any other package behind the proxy : 在安装tensorflow或代理后面的任何其他软件包时遇到的问题:
First try : 第一次尝试 :
Run the command : 运行命令:
pip install --upgrade tensorflow
Output : 输出:
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(10054, 'An existing connection was
forcibly closed by the remote host', None, 10054, None))': /simple/tensorflow/
Second try : 第二次尝试:
Then I provided the proxy details along with the command 然后我提供了代理详细信息以及命令
>pip install --upgrade tensorflow --proxy http://user:passwd@xxx.xx.x.xx:80
Output error : 输出错误:
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:83
3)'),)': /simple/tensorflow/
Third try as suggested on pip install fails with "connection error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:598)" : 在pip安装上建议的第三次尝试失败,并显示“连接错误:[SSL:CERTIFICATE_VERIFY_FAILED]证书验证失败(_ssl.c:598)” :
pip install --upgrade tensorflow --trusted-host pypi.org --trusted-host files.pythonhosted.org --proxy http://user:passwd@xxx.xx.x.xx:80
Output : 输出:
Same as above. 同上。
Can anyone help ?? 谁能帮忙??
edit : working on windows machine 编辑:在Windows机器上工作
I would suspect that you might need to set your proxy environment variables on your machine to use your proxy. 我怀疑您可能需要在计算机上设置代理环境变量才能使用代理。 Try setting the following (assumming your on a Linux or Mac OS):
尝试设置以下内容(假设您在Linux或Mac OS上):
export HTTP_PROXY=http://user:passwd@xxx.xx.x.xx:80
export HTTPS_PROXY=https://user:passwd@xxx.xx.x.xx:443
You don't necessarily need to set the HTTPS_PROXY
variable but it can't hurt to do so 您不一定需要设置
HTTPS_PROXY
变量,但这样做没有什么害处
Then try running without the flags 然后尝试在没有标志的情况下运行
pip install tensorflow
I had a similar issue after some update mix-ups between pip and apt. 在pip和apt之间进行一些更新混淆后,我遇到了类似的问题。 Following the suggestions on some SO page that I don't recall I've launched
按照一些我不记得的SO页面上的建议,我已经启动了
sudo python -m easy_install --upgrade pyOpenSSL
and got the things running again. 并让事情再次运行。
LE: might've misread the problem. LE:可能误解了问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.