【发布时间】:2017-05-29 06:22:24
【问题描述】:
我的“setup.py”目前包含以下语句:
setup(...
classifiers = [
...
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.1",
"Programming Language :: Python :: 3.2",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python",
...
],
...
)
有没有办法让我指定“任何 Python 3,从 3.0 开始”,而不明确列举所有现有和未来的 Python?
我问这个的原因是,即使上面指定了通用的“编程语言 :: Python :: 3”,Anaconda 安装也会失败:
Fetching package metadata .........
Solving package specifications: ....
UnsatisfiableError: The following specifications were found to be in conflict:
- dendropy
- python 3.5
* Use "conda info <package>" to see the dependencies for each package
pip 安装工作正常。
谢谢!
【问题讨论】:
-
"Programming Language :: Python :: 3"有什么问题? -
从示例中可以看出,我将其包含在规范中。但是,例如,Anaconda 无法在 Python 3.5 下安装此软件包,而我没有明确包含“Programming Language :: Python :: 3.5”语句。
-
我不认为
pip或conda明确检查特定版本分类器。安装仅包含"Programming Language :: Python"说明符的软件包时我没有遇到任何问题。您是否有一个可重现的示例,它何时以及如何不起作用? -
如果没有“3.5”规范行,conda 安装将失败并显示
vagrant@vagrant-ubuntu-trusty-64:~$ conda install -c ericmjl dendropy Fetching package metadata ......... Solving package specifications: .... UnsatisfiableError: The following specifications were found to be in conflict: - dendropy - python 3.5* Use "conda info <package>" to see the dependencies for each package. -
这不依赖于分类器,而是依赖于构建软件包的版本:anaconda.org/ericmjl/dendropy/files(没有 py35 构建可用于 linux)。试试
pip install dendropy。