“错误:选项-无法识别单一版本-外部管理的版本"的含义是什么?表明?
在pip install
ing varions软件包(包括PyObjC
和astropy
)时,我似乎突然开始遇到错误error: option --single-version-externally-managed not recognized
.我以前从未见过此错误,但现在它也出现在travis-ci构建中,但没有任何改变.
I seem to have suddenly started encounter the error error: option --single-version-externally-managed not recognized
when pip install
ing varions packages (including PyObjC
and astropy
). I've never seen this error before, but it's now also showing up on travis-ci builds for which nothing has changed.
此错误是否表示已过期分发?还是setup.py
中某些错误指定的选项?还是完全其他的东西?
Does this error indicate an out of date distribute? Or some incorrectly specified option in setup.py
? Or something else entirely?
新更新:
安装最新版本的setuptools
.如果仍然出现错误,请同时安装wheel
.
Install the latest version of setuptools
. If you still get the error, install wheel
as well.
pip install -U setuptools
pip install -U wheel
原始答案/更多详细信息:
--single-version-externally-managed
是用于Python软件包的选项,它指示setuptools模块创建一个Python软件包,如果需要,可以由主机的软件包管理器轻松地对其进行管理,例如Yum或Apt.
--single-version-externally-managed
is an option used for Python packages instructing the setuptools module to create a Python package which can be easily managed by the host's package manager if needed, like Yum or Apt.
如果看到此消息,则可能是旧版本的setuptools或Python.尝试使用Distribute,它是setuptools的较新版本,并且向后兼容.这些软件包可能希望您已经拥有它.
If you're seeing this message, you may have an old version of setuptools or Python. Try using Distribute, which is a newer version of setuptools and is backwards compatible. These packages may expect that you have it already.
https://pypi.python.org/pypi/distribute
至此,distribution已合并到主setuptools
项目中.只需安装最新版本的setuptools
.正如@wynemo指出的那样,您可能希望使用--egg
选项,因为它更适合那些不希望创建要分发的系统软件包的手动安装的人.
At this point, distribute has been merged into the main setuptools
project. Just install the latest version of setuptools
. As @wynemo indicated, you may wish to use the --egg
option instead, as it's more appropriate for those doing manual installations where you're not intending to create a system package for distribution.