最新的’pip’失败,“需要setuptools> = 0.8的dist-info”

问题:

使用最近(1.5)版本的pip,尝试更新多个软件包时,我收到错误。例如,sudo pip install -U pytz导致失败:

Wheel installs require setuptools >= 0.8 for dist-info support.
pip's wheel support requires setuptools >= 0.8 for dist-info support.

我不明白这个消息(I have setuptools 2.1)或是怎样做。
异常信息从日志中出现此错误:

Exception information:
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/Library/Python/2.7/site-packages/pip/commands/install.py", line 230, in run
    finder = self._build_package_finder(options, index_urls, session)
  File "/Library/Python/2.7/site-packages/pip/commands/install.py", line 185, in _build_package_finder
    session=session,
  File "/Library/Python/2.7/site-packages/pip/index.py", line 50, in __init__
    self.use_wheel = use_wheel
  File "/Library/Python/2.7/site-packages/pip/index.py", line 89, in use_wheel
    raise InstallationError("pip's wheel support requires setuptools >= 0.8 for dist-info support.")
InstallationError: pip's wheel support requires setuptools >= 0.8 for dist-info support.

回答:

这对我有用:

sudo pip install setuptools --no-use-wheel --upgrade

注意sudo的用法
 UPDATE
在窗口上,您只需要以管理员身份执行pip install setuptools --no-use-wheel --upgrade。在unix / linux中,sudo命令用于升级权限。
 UPDATE
这似乎已经在1.5.1中修复。

 
 
Code问答: http://codewenda.com/topics/python/
Stackoverflow: Latest ‘pip’ fails with “requires setuptools >= 0.8 for dist-info”

*转载请注明本文链接以及stackoverflow的英文链接

发表评论

电子邮件地址不会被公开。 必填项已用*标注

20 + = 29