Thumbnail: python

How to easy_install and pip through a proxy

by on under Python
1 minute read

If you’re trying to install a Python package using easy_install or pip and you connect to the internet via a proxy you’ll need to make a few changes to your setup.


_easyinstall requires you set the http_proxy and https_proxy environment variables. You can either run the following commands in a terminal or add them to your .bashrc.

export http_proxy=http://proxy_url:proxy_port
export https_proxy=http://proxy_url:proxy_port


pip should follow the same rules as above, so you can specify the proxy config in your environment variables.

However it also supports a --proxy flag if you want to specify it manually.

pip install --proxy=http://proxy_url:proxy_port package
python, easy_install, pip, proxy
Spotted a mistake in this article? Why not suggest an edit!
comments powered by Disqus