I'm running Ubuntu Server 10.04 64-bit under VirtualBox, and it seems that everything except easy_install and pip can connect to the Internet. I have set and exported the http_proxy environment variable, and also set up the proxy address in every other location I'm aware of. Yet easy_install always returns "Network is unreachable":
:~$ echo $http_proxy
http://192.168.1.25:80/
:~$ grep "http_proxy" /etc/bash.bashrc
export http_proxy=http://192.168.1.25:80/
:~$ grep "http_proxy" /etc/wgetrc
http_proxy = http://192.168.1.25:80/
:~$ ping pypi.python.org
PING pypi.python.org (82.94.164.168) 56(84) bytes of data.
64 bytes from pypi.python.org (82.94.164.168): icmp_seq=1 ttl=53 time=114 ms
64 bytes from pypi.python.org (82.94.164.168): icmp_seq=2 ttl=53 time=113 ms
64 bytes from pypi.python.org (82.94.164.168): icmp_seq=3 ttl=53 time=113 ms
64 bytes from pypi.python.org (82.94.164.168): icmp_seq=4 ttl=53 time=113 ms
64 bytes from pypi.python.org (82.94.164.168): icmp_seq=5 ttl=53 time=114 ms
64 bytes from pypi.python.org (82.94.164.168): icmp_seq=6 ttl=53 time=113 ms
^C
--- pypi.python.org ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5006ms
rtt min/avg/max/mdev = 113.367/113.871/114.678/0.614 ms
:~$ sudo easy_install virtualenv
Searching for virtualenv
Reading http://pypi.python.org/simple/virtualenv/
Download error: [Errno 101] Network is unreachable -- Some packages may not be found!
Reading http://pypi.python.org/simple/virtualenv/
^Cinterrupted
:~$
I can even connect to the site from within Python:
>>> import urllib
>>> obj = urllib.urlopen('http://pypi.python.org/simple/virtualenv/')
>>> obj.readlines()[0]
'<html><head><title>Links for virtualenv</title></head><body><h1>Links for virtualenv</h1><a href="../../packages/source/v/virtualenv/virtualenv-1.5.1.tar.gz#md5=3daa1f449d5d2ee03099484cecb1c2b7">virtualenv-1.5.1.tar.gz</a><br/>\n'
I have had the same result with packages other than virtualenv
. Is easy_install looking somewhere else for connection information, or is there something obvious I'm missing?