easy_install will not connect through proxy

Solution 1:

It's a problem with sudo. If you use sudo, the variable $http_proxy is unknown in this context.

sudo -i opens up a root shell. There you can set the $http_proxy variable again and then easy_install works - you don't have to use sudo because you are already superuser.

$ sudo -i
# export http_proxy=http://192.168.1.25:80
# easy_install virtualenv

Or you can have your actual environment in sudo context and save the "get root step" via:

$ sudo -E easy_install virtualenv

Solution 2:

Rather than opening up a root shell with sudo -i you can run the command

$ sudo -E easy_install virtualenv

The -E switch preserves your current environment.

Solution 3:

I had to add

# export http_proxy=x.x.x.x:YY
# export https_proxy=x.x.x.x:YY
# export ftp_proxy=x.x.x.x:YY