gpt4 book ai didi

python - Pip 忽略了 PyPI 上我的软件包的最新版本

转载 作者:太空宇宙 更新时间:2023-11-03 14:28:56 26 4
gpt4 key购买 nike

我最近将我一直在开发的一个名为 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,而所有后缀为 devXrcX 的版本均不被视为稳定。您可以通过添加 --pre 选项来覆盖它:

$ pip install nineml --pre

See also the explanation in pip docs .

关于python - Pip 忽略了 PyPI 上我的软件包的最新版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47444636/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com