easy_install pip == [Errno 8]提供nodename或servname,或者不知道

时间:2012-08-13 09:31:30

标签: python pip easy-install

我通过pythonbrew安装了python 2.7.3安装pip的麻烦:

pythonbrew update --master
pythonbrew install 2.7.3 --force

在尝试从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
...

运行easy_install pip也会导致同样的错误。当然,我仍然可以克隆pip repo并手动安装它,但很高兴知道它为什么会通过easy_install失败。有什么想法吗?


更新

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

2 个答案:

答案 0 :(得分:6)

有两件事可能是错的:

  • pip.openplans.org的DNS查找失败;使用host pip.openplans.org进行测试。这可能是一个地方问题;使用host pip.openplans.org 8.8.8.8host pip.openplans.org 8.8.4.4对Google DNS服务器进行测试。如果所有这些查找失败,请向互联网上帝牺牲一只鸡并等待改进。

  • 如果DNS查找没有失败,但是安装是,那么您的本地DNS缓存可能会持续进行否定查找。使用命令dscacheutil -flushcache冲洗它。

答案 1 :(得分:1)

对我来说,在Mac OS X Yosemite上再次启用和关闭WiFi。