2

I am trying to install python packages behind a proxy and I get the following error:

pip --proxy="user:pass@address:port" install bokeh

Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ProtocolError('Connection aborted.', BadStatusLine("''",))': /simple/bokeh/

What do you think is going wrong?

severine
  • 305
  • 1
  • 3
  • 11

3 Answers3

1

SOLVED The issue was that my dorm firewall is blocking pip (pypi.python.org). Issuing the same command at work installs python packages correctly.

severine
  • 305
  • 1
  • 3
  • 11
0

When a proxy terminates a HTTPS connection. It can't send back headers, because it can't read the encrypted data going back and forth, so it sends back the empty string "". httplib attempts to parse "" as "HTTP/1.x " and fails with the above message.

https://github.com/requests/requests/issues/2364

You may want to see this post on how to setup PIP behind a proxy. Are you able to get any pip installs to work or is this the only one giving you a problem?

Using pip behind a proxy

Chris Hawkes
  • 11,923
  • 6
  • 58
  • 68
  • thanks for the answer. I can't install anything with pip, bokeh is given as an example here. I think the problem is that pip can't reach https://pypi.python.org but not sure how to fix it (I already specify proxy settings in the command ) – severine Aug 15 '17 at 21:34
  • i'm assuming you're subbing your user:pass with your real network username and password and using the proxy web address for the address part? "pip --proxy="user:pass@address:port" install bokeh" – Chris Hawkes Aug 16 '17 at 13:37
0

I had the same problem with MEO in Por

I changed my IPv4 DNS to 8.8.8.8 and 8.8.4.4 (Google) and disabled IPv6 and it worked.