什么是“错误:选项--single-版本外部管理不认可”说明什么?(What does “error

2019-07-18 03:57发布

我似乎突然开始遇到的错误error: option --single-version-externally-managed not recognized时, pip install荷兰国际集团varions包(包括PyObjCastropy )。 我从来没有见过这个错误,但它现在也显示在特拉维斯-CI起来建立了这一切都没有改变。

此错误指示过时的分配? 或者一些正确指定的选项setup.py ? 还是其他?

Answer 1:

新的更新:

安装最新版本的setuptools 。 如果仍然出现错误,安装wheel也是如此。

pip install -U setuptools
pip install -U wheel

原来的答案/更多详细信息:

--single-version-externally-managed是用于Python包指示setuptools的模块来创建一个Python包,它可以根据需要,像百胜或公寓很容易被宿主的软件包管理器管理的选项。

如果您看到这个消息,你可能有一个旧版本的setuptools或Python的。 尝试使用分配,这是setuptools的较新版本是向后兼容的。 这些软件包可能期望你拥有它了。

https://pypi.python.org/pypi/distribute

编辑:在这一点上,发布已被合并到主setuptools项目。 只要安装最新版本的setuptools 。 作为@wynemo指出,你不妨使用--egg选项,而不是,因为它更适合那些手工做安装在那里你不打算创建一个系统分发包。



Answer 2:

添加--egg选项

pip install --egg SCons

我使用pip版本1.4.1



Answer 3:

安装wheel近期解决这个问题pip (我用8.1.2):

pip install wheel


Answer 4:

尝试升级这样的setuptools:

pip install --upgrade setuptools



Answer 5:

我是有这个问题。 原来,这是对我的点子缓存中的文件权限的问题。

如果你看到一则消息在画中画输出的最开始喜欢

The directory '/home/ubuntu/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/ubuntu/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.

你可能有同样的问题。 您可以通过确保你有你的点子缓存适当的文件权限(类似解决它chown -R $(whoami) /home/ubuntu/.cache/pip ),或者,如果你使用的是UNIX,可以设置画中画缓存位置与XDG_CACHE_HOME的环境变量,以你自己的一些文件夹。



Answer 6:

我想,我有最新版本的一切,在我的Debian 9系统PIP3我无法安装3.7.1或3.5.3。
使用--egg选项是一个非首发:$ sudo的PIP 3 --egg安装/home/dick/PY/Python-3.7.1.tgz

用法:
点子[选项]没有这样的选择:--egg



Answer 7:

还当我尝试升级一个Python包,我有我的MacBook这个问题。 我在OS X检查PIP版本,它太旧:1.1。 我用后续cmd以PIP升级到1.5.6

easy_install -U pip

然后这个错误是固定的。



文章来源: What does “error: option --single-version-externally-managed not recognized” indicate?