最新的“pip"失败,“需要 setuptools >= 0.8 for dist-info" [英] Latest 'pip' fails with "requires setuptools >= 0.8 for dist-info"

查看:30
本文介绍了最新的“pip"失败,“需要 setuptools >= 0.8 for dist-info"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用最新 (1.5) 版本的 pip,在尝试更新多个软件包时出现错误.例如,sudo pip install -U pytz 导致失败:

Using the recent (1.5) version of pip, I get an error when attempting to update several packages. For example, sudo pip install -U pytz results in failure with:

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

我不明白这个消息(我有 setuptools 2.1) 或什么去做吧.

I don't understand this message (I have setuptools 2.1) or what to do about it.

该错误日志中的异常信息:

Exception information from the log for this error:

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 的用法

Note it's usage of sudo

更新

在窗口中,您只需要以管理员身份执行 pip install setuptools --no-use-wheel --upgrade.在 unix/linux 中,sudo 命令用于提升权限.

On window you just need to execute pip install setuptools --no-use-wheel --upgrade as an administrator. In unix/linux, sudo command is for elevating permissions.

更新

这似乎已在 1.5.1 中修复.

This appears to have been fixed in 1.5.1.

这篇关于最新的“pip"失败,“需要 setuptools >= 0.8 for dist-info"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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