Wednesday, April 3, 2013

How to install packages with easy_install or pip through proxy

There are two easy way to install packages for python (regardless of the platform you're using), namely easy_install and pip. The later is actually an overlay on the former.

They work very nicely, except with pesky proxies. Both of them have the ability to download through proxy, but they use different syntax.

For pip you will simply add the option '--proxy' to indicate the proxy address like so:


Whereas easy_install will rely on environment variables, http_proxy, https_proxy , ftp_proxy
If you want those settings to persist, don't forget to add them to your bashrc, or through your windows settings