Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/321.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 最新版本';pip';以“失败”;需要设置工具>;=0.8表示地区信息”;_Python_Pip_Setuptools_Python Wheel - Fatal编程技术网

Python 最新版本';pip';以“失败”;需要设置工具>;=0.8表示地区信息”;

Python 最新版本';pip';以“失败”;需要设置工具>;=0.8表示地区信息”;,python,pip,setuptools,python-wheel,Python,Pip,Setuptools,Python Wheel,使用最新(1.5)版本的pip,我在尝试更新几个软件包时出错。例如,sudo pip安装-U pytz导致以下故障: Wheel installs require setuptools >= 0.8 for dist-info support. pip's wheel support requires setuptools >= 0.8 for dist-info support. 我不明白这条信息,也不知道该怎么办 此错误日志中的异常信息: Exception informat

使用最新(1.5)版本的
pip
,我在尝试更新几个软件包时出错。例如,
sudo pip安装-U pytz
导致以下故障:

Wheel installs require setuptools >= 0.8 for dist-info support.
pip's wheel support requires setuptools >= 0.8 for dist-info support.
我不明白这条信息,也不知道该怎么办


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

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

更新

在Windows上,您只需以管理员身份执行
pip安装setuptools--不使用控制盘--升级
。在unix/linux中,
sudo
命令用于提升权限

更新


这似乎已在1.5.1中修复。

首先,您不应该运行“sudopip”

如果可能,您应该使用系统包管理器,因为它使用GPG签名来确保您没有运行恶意代码

否则,请尝试升级setuptools:

easy_install -U setuptools
或者,尝试:

pip install --user <somepackage>
pip安装--用户

这当然适用于“全球”软件包。理想情况下,您应该使用virtualenvs。

很抱歉,这似乎并不能完全解决我的问题,我仍在努力。我现在必须恢复使用pip 1.4,稍后将寻找修复方法。为我工作。不知道为什么会发生这种情况。请注意,添加的
--No use wheel
选项只是跳过了的使用,但在其他方面执行的安装与省略它的命令完全相同。在Centos 6上为我工作。讨论一个抽象的错误消息。通常,以sudo的形式运行pip是错误的。然而,有时您确实需要将一些东西安装到系统python中(例如virtualenv或pip本身),而sudo则是合适的。@LukeSneeringer:如果没有一些主要的重新配置,我想我真的没有选择。
easy_install-U setuptools
rocks!