How to easy_install and pip through a proxy
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.
easy_install 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
Let me know what you think of this article on twitter @_jacobtomlinson or leave a comment below!