Andrei Andrei - 3 months ago 51
Python Question

easy_install pip == [Errno 8] nodename nor servname provided, or not known

I have troubles installing pip for python 2.7.3 installed via pythonbrew:

pythonbrew update --master
pythonbrew install 2.7.3 --force


This fails on the final stage hanging when trying to fetch pip from pip.openplans.org:

Installed /Users/andrei/.pythonbrew/pythons/Python-2.7.3/lib/python2.7/site-packages/distribute-0.6.28-py2.7.egg
Processing dependencies for distribute==0.6.28
Finished processing dependencies for distribute==0.6.28
After install bootstrap.
Don't have permissions to write /Users/andrei/.pythonbrew/pythons/Python-2.7.3/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg-info, skipping
Creating /Users/andrei/.pythonbrew/pythons/Python-2.7.3/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg-info
Creating /Users/andrei/.pythonbrew/pythons/Python-2.7.3/lib/python2.7/site-packages/setuptools.pth
Searching for pip
Reading http://pypi.python.org/simple/pip/
Reading http://pip.openplans.org
Download error on http://pip.openplans.org: [Errno 8] nodename nor servname provided, or not known -- Some packages may not be found!
Reading http://pip.openplans.org
Download error on http://pip.openplans.org: [Errno 8] nodename nor servname provided, or not known -- Some packages may not be found!
Reading http://pip.openplans.org
...


Running
easy_install pip
also results in the same error. Of course, I can still clone
pip
repo and install it manually, but would be nice to know why it fails via
easy_install
. Any idea?




Update:



$ host pip.openplans.org
pip.openplans.org is an alias for puffin.oddbird.net.
puffin.oddbird.net has address 173.203.85.138

Answer

Two things might be wrong:

  • The DNS lookup is failing for pip.openplans.org; test with host pip.openplans.org. This could be a local problem; test against the Google DNS servers too with host pip.openplans.org 8.8.8.8 and host pip.openplans.org 8.8.4.4. If all these lookups fail, sacrifice a chicken to the Internet Gods and wait for improvement.

  • If the DNS lookup is not failing, but the install is, then your local DNS cache might be holding on to a negative lookup. Flush it with the command dscacheutil -flushcache.