1

Facing issues while installing tensorflow or any other package behind the proxy :

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 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

Vineet Singla
  • 1,609
  • 2
  • 20
  • 34

2 Answers2

0

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):

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

Then try running without the flags

pip install tensorflow
ScottMcC
  • 4,094
  • 1
  • 27
  • 35
0

I had a similar issue after some update mix-ups between pip and apt. Following the suggestions on some SO page that I don't recall I've launched

sudo python -m easy_install --upgrade pyOpenSSL 

and got the things running again.

LE: might've misread the problem.

Lohmar ASHAR
  • 1,639
  • 14
  • 18
  • Getting error : Download error on https://pypi.python.org/simple/pyOpenSSL/: [WinError 10061] No connection could be made because the target machine actively refused it -- Some packages may not be found! – Vineet Singla Jun 28 '18 at 09:59
  • 1
    You're hitting the proxy "wall" again ... I've found [this](https://stackoverflow.com/questions/9698557/how-to-use-pip-on-windows-behind-an-authenticating-proxy) that might help on making pip work under a proxy in windows, but I would also advise to pull out your phone, enable tethering and pull the stuff you need from internet avoiding the hassle :). – Lohmar ASHAR Jun 28 '18 at 10:14