pip 无法安装任何东西 [英] pip cannot install anything

查看:86
本文介绍了pip 无法安装任何东西的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

> pip install yolk
Downloading/unpacking yolk
  Cannot fetch index base URL https://pypi.python.org/simple/
  Could not find any downloads that satisfy the requirement yolk
No distributions at all found for yolk
Storing complete log in /Users/harith/.pip/pip.log

当我阅读文件时我看到

> cat /Users/harith/.pip/pip.log
------------------------------------------------------------
/Users/harith/.shared/virtualenvs/pennytracker/bin/pip run on Mon Jul  1 20:26:02 2013
Downloading/unpacking yolk

  Getting page https://pypi.python.org/simple/yolk/
  Could not fetch URL https://pypi.python.org/simple/yolk/: HTTP Error 503: Service Unavailable
  Will skip URL https://pypi.python.org/simple/yolk/ when looking for download links for yolk
  Getting page https://pypi.python.org/simple/
  Could not fetch URL https://pypi.python.org/simple/: HTTP Error 503: Service Unavailable
  Will skip URL https://pypi.python.org/simple/ when looking for download links for yolk
  Cannot fetch index base URL https://pypi.python.org/simple/

  URLs to search for versions for yolk:
  * https://pypi.python.org/simple/yolk/
  Getting page https://pypi.python.org/simple/yolk/
  Could not fetch URL https://pypi.python.org/simple/yolk/: HTTP Error 503: Service Unavailable
  Will skip URL https://pypi.python.org/simple/yolk/ when looking for download links for yolk
  Could not find any downloads that satisfy the requirement yolk

No distributions at all found for yolk

    Exception information:
    Traceback (most recent call last):
      File "/Users/harith/.shared/virtualenvs/pennytracker/lib/python2.7/site-packages/pip-1.3.1-py2.7.egg/pip/basecommand.py", line 139, in main
        status = self.run(options, args)
      File "/Users/harith/.shared/virtualenvs/pennytracker/lib/python2.7/site-packages/pip-1.3.1-py2.7.egg/pip/commands/install.py", line 266, in run
        requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
      File "/Users/harith/.shared/virtualenvs/pennytracker/lib/python2.7/site-packages/pip-1.3.1-py2.7.egg/pip/req.py", line 1026, in prepare_files
        url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
      File "/Users/harith/.shared/virtualenvs/pennytracker/lib/python2.7/site-packages/pip-1.3.1-py2.7.egg/pip/index.py", line 171, in find_requirement
        raise DistributionNotFound('No distributions at all found for %s' % req)
    DistributionNotFound: No distributions at all found for yolk

我做错了什么吗?

推荐答案

这是下面链接的博客文章的全文:

This is the full text of the blog post linked below:

如果您最近尝试使用 pip 安装软件包,您可能会遇到此错误:

If you've tried installing a package with pip recently, you may have encountered this error:

Could not fetch URL https://pypi.python.org/simple/Django/: There was a problem confirming the ssl certificate: <urlopen error [Errno 1] _ssl.c:504: error:0D0890A1:asn1 encoding routines:ASN1_verify:unknown message digest algorithm>
  Will skip URL https://pypi.python.org/simple/Django/ when looking for download links for Django==1.5.1 (from -r requirements.txt (line 1))
  Could not fetch URL https://pypi.python.org/simple/: There was a problem confirming the ssl certificate: <urlopen error [Errno 1] _ssl.c:504: error:0D0890A1:asn1 encoding routines:ASN1_verify:unknown message digest algorithm>
  Will skip URL https://pypi.python.org/simple/ when looking for download links for Django==1.5.1 (from -r requirements.txt (line 1))
  Cannot fetch index base URL https://pypi.python.org/simple/
  Could not fetch URL https://pypi.python.org/simple/Django/1.5.1: There was a problem confirming the ssl certificate: <urlopen error [Errno 1] _ssl.c:504: error:0D0890A1:asn1 encoding routines:ASN1_verify:unknown message digest algorithm>
  Will skip URL https://pypi.python.org/simple/Django/1.5.1 when looking for download links for Django==1.5.1 (from -r requirements.txt (line 1))
  Could not fetch URL https://pypi.python.org/simple/Django/: There was a problem confirming the ssl certificate: <urlopen error [Errno 1] _ssl.c:504: error:0D0890A1:asn1 encoding routines:ASN1_verify:unknown message digest algorithm>
  Will skip URL https://pypi.python.org/simple/Django/ when looking for download links for Django==1.5.1 (from -r requirements.txt (line 1))
  Could not find any downloads that satisfy the requirement Django==1.5.1 (from -r requirements.txt (line 1))
No distributions at all found for Django==1.5.1 (from -r requirements.txt (line 1))
Storing complete log in /Users/paul/.pip/pip.log

这似乎是旧版本的 OpenSSL 与 pip 1.3.1 不兼容的问题.如果您使用的是非库存 Python 发行版(尤其是 EPD 7.3),那么您的设置很可能在没有大量工作的情况下无法与 pip 1.3.1 一起使用.

This seems to be an issue with an old version of OpenSSL being incompatible with pip 1.3.1. If you're using a non-stock Python distribution (notably EPD 7.3), you're very likely to have a setup that isn't going to work with pip 1.3.1 without a shitload of work.

目前最简单的解决方法是安装不需要 SSL 的 pip 1.2.1:

The easy workaround for now, is to install pip 1.2.1, which does not require SSL:

curl -O https://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz
tar xvfz pip-1.2.1.tar.gz
cd pip-1.2.1
python setup.py install

如果您正在使用 EPD,并且您没有将它用于可能会出现问题的课程,您可能需要考虑安装新的化身:Enthought Canopy.我知道他们知道由以前版本的 OpenSSL 引起的问题,并且可以想象他们现在使用的新版本应该可以很好地与 pip 1.3.1 配合使用.

If you are using EPD, and you're not using it for a class where things might break, you may want to consider installing the new incarnation: Enthought Canopy. I know they were aware of the issues caused by the previous version of OpenSSL, and would imagine they are using a new version now that should play nicely with pip 1.3.1.

这篇关于pip 无法安装任何东西的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆