2

I am trying to install on my Ubuntu 14.04 machine mercurial using easy_install. I type this command to install as root user :

sudo easy_install mercurial

And on the terminal i get this error message :

Searching for mercurial
Reading https://pypi.python.org/simple/mercurial/
Download error on https://pypi.python.org/simple/mercurial/: [Errno -2] Name or service not known -- Some packages may not be found!
Couldn't find index page for 'mercurial' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
Download error on https://pypi.python.org/simple/: [Errno -2] Name or service not known -- Some packages may not be found!
No local packages or download links found for mercurial
error: Could not find suitable distribution for Requirement.parse('mercurial')

Can anybody help me out why its not working?

PS. I am running this behind proxy, and i have all the necessay env variable set. When i run env command i have

HTTP_PROXY=http://username:password@172.31.102.14:3128
HTTPS_PROXY=https://username:password@172.31.102.14:3128

as my proxy set.

1 Answers1

3

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

You could use sudo -i (It will open root shell for you) then set the proxy variable again. After that, run easy_install (no need of sudo as you are already super user)

For more details: https://superuser.com/questions/258819/easy-install-will-not-connect-through-proxy?answertab=active#tab-top

Community
  • 1
  • 1
Tevin Joseph K O
  • 2,574
  • 22
  • 24
  • Nothing. The same error comes. It shows : `build-essential is already the newest version. build-essential set to manually installed. python-dev is already the newest version. python-setuptools is already the newest version.` Do we need to configure proxy for easy_install or it takes from the env ? – Deepankar Singh Sep 06 '15 at 08:30
  • @DeepankarSingh Updated the answer. – Tevin Joseph K O Sep 06 '15 at 14:50