Python Forum

Full Version: Problem Getting Pip To Work Behind Linux Proxy
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

I am just wondering if someone can help me get pip to work behind network proxy on Linux. If I configure Linux environmental variables I can get apt-get update to work.

Quote:export http_proxy='http://USER:PASSWORD@PROXY_SERVER:PORT'

It might be worth pointing out the password is using special characters.

I have also tried setting the proxy information within a pip.conf file and supplying it as command like arguments to pip but nothing works.

My primary error message is:
Quote:WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7ff0b536dd60>: Failed to establish a new connection: [Errno -2] Name or service not known'))':

I am not understanding why this does not work but apt-get does work. I have a feeling this problem maybe tied to urllib3 but at this point I have found no good information on this. The only information I have found is different ways of supplying the configuration to pip but I am starting to think this maybe related more to python.

Any help, comments, or advise for maybe a workaround would be greatly appreciated.

Thanks,
joe