The Computer Oracle

easy_install will not connect through proxy

--------------------------------------------------
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: Future Grid Looping

--

Chapters
00:00 Easy_install Will Not Connect Through Proxy
01:03 Accepted Answer Score 31
01:39 Answer 2 Score 7
01:54 Answer 3 Score 1
01:59 Thank you

--

Full question
https://superuser.com/questions/258819/e...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#ubuntu #virtualbox #proxy #python #easyinstall

#avk47



ACCEPTED ANSWER

Score 31


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



ANSWER 2

Score 7


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.




ANSWER 3

Score 1


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