Pip 忽略了 PyPI 上我的包的最新版本
Pip is ignoring the most recent releases of my package on PyPI
我最近将我一直在开发的名为 nineml
的 Python 软件包的几个版本上传到 PyPI。通过 PyPI 网站 (https://pypi.python.org/pypi/nineml) 导航至 nineml 会将我带到最新版本 (1.0rc2)。但是,当我尝试使用 pip
安装它时,只找到最旧的版本 (0.1),尽管它与 Python 3 不兼容(此问题也发生在 Python 2.7)。
查看详细输出(下方)pip
似乎找到了较新版本的链接,但未将它们包含在版本列表中
(nineml-test3) tclose@potassium:~$ python --version
Python 3.6.2
(nineml-test3) tclose@potassium:~$ pip install -vvv nineml
Collecting nineml
1 location(s) to search for versions of nineml:
* https://pypi.python.org/simple/nineml/
Getting page https://pypi.python.org/simple/nineml/
Looking up "https://pypi.python.org/simple/nineml/" in the cache
Current age based on date: 140
Freshness lifetime from max-age: 600
Freshness lifetime from request max-age: 600
The response is "fresh", returning cached response
600 > 140
Analyzing links from page https://pypi.python.org/simple/nineml/
Found link https://pypi.python.org/packages/18/25/67fcf106b63c515e86b41c579809fbdee6468abc2b0efba497017da087d8/nineml-1.0rc1-py2.py3-none-any.whl#md5=ca3c30a777e443069c9d6d60a3f819f6 (from https://pypi.python.org/simple/nineml/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4), version: 1.0rc1
Found link https://pypi.python.org/packages/26/a8/42ad4062d40f7e1c71d6195814d47a9b8a4c55b310f9d1d943a7a57d6a36/nineml-1.0rc2-py2.py3-none-any.whl#md5=94497e8caf47f38240dcd1bc703ffd52 (from https://pypi.python.org/simple/nineml/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4), version: 1.0rc2
Skipping link https://pypi.python.org/packages/2d/6f/573b71c04f891d968f44efd86a87b457072d5a92d4364c6e8a6420560f83/nineml-0.1-py2-none-any.whl#md5=6d7e0dee64e4bc181b141044368997b0 (from https://pypi.python.org/simple/nineml/); it is not compatible with this Python
Found link https://pypi.python.org/packages/3c/da/844e823a9b932041b880414896759502697bff369d3b5f33c9b0d53f2b76/nineml-0.1.tar.gz#md5=fd0f8c6d90aed2fe6b1bc8a696a85eff (from https://pypi.python.org/simple/nineml/), version: 0.1
Found link https://pypi.python.org/packages/40/ad/dc65fd215c717c92119149104371b56b74aa32e1b1fecfef5637af467cb7/nineml-1.0rc1.tar.gz#md5=91fe5e41c89309803c036981362dd94e (from https://pypi.python.org/simple/nineml/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4), version: 1.0rc1
Found link https://pypi.python.org/packages/b7/9e/f2611491478af2ecd55c74ac2ef8adf825be6d327916043b4abe910dd051/nineml-1.0rc2.tar.gz#md5=fb580237a2a156f8559420c23547812d (from https://pypi.python.org/simple/nineml/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4), version: 1.0rc2
Using version 0.1 (newest of versions: 0.1)
Looking up "https://pypi.python.org/packages/3c/da/844e823a9b932041b880414896759502697bff369d3b5f33c9b0d53f2b76/nineml-0.1.tar.gz" in the cache
Current age based on date: 169019
Freshness lifetime from max-age: 31557600
The response is "fresh", returning cached response
31557600 > 169019
Using cached nineml-0.1.tar.gz
Downloading from
我认为我的 setup.py
非常简单
#!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name="nineml",
version="1.0rc2",
packages=find_packages(),
# add your name here if you contribute to the code
author="Andrew P. Davison, Thomas G. Close, Mike Hull, Eilif Muller",
author_email="myemail@gmail.com",
description=(
"A tool for reading, writing and generally working with 9ML objects "
"and files."),
long_description=open("README.rst").read(),
license="BSD 3 License",
keywords=("computational neuroscience modeling interoperability XML YAML"
"HDF5 JSON"),
url="http://nineml-python.readthedocs.io",
classifiers=['Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: BSD License',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Topic :: Scientific/Engineering'],
install_requires=['lxml>=3.7.3',
'future>=0.16.0',
'h5py>=2.7.0',
'PyYAML>=3.1',
'sympy>=1.1'],
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4',
tests_require=['nose', 'numpy']
)
知道它为什么忽略最新版本吗?
因为rc2
后缀。默认情况下,pip
将只安装软件包的稳定版本。您的最后一个稳定版本是 0.1
,而所有后缀为 devX
或 rcX
的版本都不是稳定的。您可以通过添加 --pre
选项来覆盖它:
$ pip install nineml --pre
我最近将我一直在开发的名为 nineml
的 Python 软件包的几个版本上传到 PyPI。通过 PyPI 网站 (https://pypi.python.org/pypi/nineml) 导航至 nineml 会将我带到最新版本 (1.0rc2)。但是,当我尝试使用 pip
安装它时,只找到最旧的版本 (0.1),尽管它与 Python 3 不兼容(此问题也发生在 Python 2.7)。
查看详细输出(下方)pip
似乎找到了较新版本的链接,但未将它们包含在版本列表中
(nineml-test3) tclose@potassium:~$ python --version
Python 3.6.2
(nineml-test3) tclose@potassium:~$ pip install -vvv nineml
Collecting nineml
1 location(s) to search for versions of nineml:
* https://pypi.python.org/simple/nineml/
Getting page https://pypi.python.org/simple/nineml/
Looking up "https://pypi.python.org/simple/nineml/" in the cache
Current age based on date: 140
Freshness lifetime from max-age: 600
Freshness lifetime from request max-age: 600
The response is "fresh", returning cached response
600 > 140
Analyzing links from page https://pypi.python.org/simple/nineml/
Found link https://pypi.python.org/packages/18/25/67fcf106b63c515e86b41c579809fbdee6468abc2b0efba497017da087d8/nineml-1.0rc1-py2.py3-none-any.whl#md5=ca3c30a777e443069c9d6d60a3f819f6 (from https://pypi.python.org/simple/nineml/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4), version: 1.0rc1
Found link https://pypi.python.org/packages/26/a8/42ad4062d40f7e1c71d6195814d47a9b8a4c55b310f9d1d943a7a57d6a36/nineml-1.0rc2-py2.py3-none-any.whl#md5=94497e8caf47f38240dcd1bc703ffd52 (from https://pypi.python.org/simple/nineml/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4), version: 1.0rc2
Skipping link https://pypi.python.org/packages/2d/6f/573b71c04f891d968f44efd86a87b457072d5a92d4364c6e8a6420560f83/nineml-0.1-py2-none-any.whl#md5=6d7e0dee64e4bc181b141044368997b0 (from https://pypi.python.org/simple/nineml/); it is not compatible with this Python
Found link https://pypi.python.org/packages/3c/da/844e823a9b932041b880414896759502697bff369d3b5f33c9b0d53f2b76/nineml-0.1.tar.gz#md5=fd0f8c6d90aed2fe6b1bc8a696a85eff (from https://pypi.python.org/simple/nineml/), version: 0.1
Found link https://pypi.python.org/packages/40/ad/dc65fd215c717c92119149104371b56b74aa32e1b1fecfef5637af467cb7/nineml-1.0rc1.tar.gz#md5=91fe5e41c89309803c036981362dd94e (from https://pypi.python.org/simple/nineml/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4), version: 1.0rc1
Found link https://pypi.python.org/packages/b7/9e/f2611491478af2ecd55c74ac2ef8adf825be6d327916043b4abe910dd051/nineml-1.0rc2.tar.gz#md5=fb580237a2a156f8559420c23547812d (from https://pypi.python.org/simple/nineml/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4), version: 1.0rc2
Using version 0.1 (newest of versions: 0.1)
Looking up "https://pypi.python.org/packages/3c/da/844e823a9b932041b880414896759502697bff369d3b5f33c9b0d53f2b76/nineml-0.1.tar.gz" in the cache
Current age based on date: 169019
Freshness lifetime from max-age: 31557600
The response is "fresh", returning cached response
31557600 > 169019
Using cached nineml-0.1.tar.gz
Downloading from
我认为我的 setup.py
非常简单
#!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name="nineml",
version="1.0rc2",
packages=find_packages(),
# add your name here if you contribute to the code
author="Andrew P. Davison, Thomas G. Close, Mike Hull, Eilif Muller",
author_email="myemail@gmail.com",
description=(
"A tool for reading, writing and generally working with 9ML objects "
"and files."),
long_description=open("README.rst").read(),
license="BSD 3 License",
keywords=("computational neuroscience modeling interoperability XML YAML"
"HDF5 JSON"),
url="http://nineml-python.readthedocs.io",
classifiers=['Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: BSD License',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Topic :: Scientific/Engineering'],
install_requires=['lxml>=3.7.3',
'future>=0.16.0',
'h5py>=2.7.0',
'PyYAML>=3.1',
'sympy>=1.1'],
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4',
tests_require=['nose', 'numpy']
)
知道它为什么忽略最新版本吗?
因为rc2
后缀。默认情况下,pip
将只安装软件包的稳定版本。您的最后一个稳定版本是 0.1
,而所有后缀为 devX
或 rcX
的版本都不是稳定的。您可以通过添加 --pre
选项来覆盖它:
$ pip install nineml --pre