简体   繁体   English

给定 Python 的维护版本,pip 是否共享相同版本的包?

[英]Does pip share the same versions of a package given a maintenance version of Python?

It seems that many projects provide only an indication of the minor python version (eg python 3.6 ), whereas requirements.txt may require a specific version of a package (eg torch==0.4 ).似乎许多项目仅提供次要 python 版本的指示(例如python 3.6 ),而 requirements.txt 可能需要特定版本的包(例如torch==0.4 )。

This specific version of a package is not available for any minor python version (eg torch==0.4 can be installed only with python 3.5 ou 3.6).这个特定版本的包不适用于任何次要的 python 版本(例如, torch==0.4只能与 python 3.5 或 3.6 一起安装)。

But what happens with maintenance Python versions?但是维护 Python 版本会发生什么? (eg python 3.6.9). (例如python 3.6.9)。 Can we assume that torch==0.4 will always be distributed?我们可以假设torch==0.4会一直分发吗?

Python project distributions (libraries, packages, applications) are meant to be compatible with all maintenance releases of the same minor version of the Python interpreter (in 3.6.9 : 3 stands for the major , 6 for the minor, and 9 for the maintenance or bugfix ). Python 项目发行版(库、包、应用程序)旨在与 Python 解释器的同一次要版本的所有维护版本兼容(在3.6.9 中3代表主要6代表次要, 9代表维护或错误修正)。 In other words if a library is advertised as compatible with Python 3.6, it means it is compatible with all Python 3.6.* versions (3.6.0, 3.6.1, 3.6.9, etc.).换句话说,如果一个库被宣传为与 Python 3.6 兼容,则意味着它与所有 Python 3.6.*版本(3.6.0、3.6.1、3.6.9 等)兼容。 On the other hand there is no guarantee it is compatible with 3.7.* , 3.5.* , or even less so with 2.* or 4.* .另一方面,不能保证它与3.7.*3.5.*兼容,甚至与2.*4.*兼容。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Pip 列出与 Python 版本不兼容的包版本 - Pip lists versions of the package incompatible with the version of Python 为什么 python 包使用 __version__ 和 pip (同一目录)显示不同的版本 - Why a python package shows different versions using __version__ and pip (same directory) pip 在安装兼容的包版本时是否考虑了实际的 Python 版本? - Does pip take into account the actual Python version when installing compatible package versions? 为什么pip会根据python版本升级到不同版本? - Why does pip upgrade to different versions depending on python version? 如果Windows上有两个相同版本的python,如何使用pip安装软件包 - how to use pip install a package if there are two same version of python on windows 为什么Pip声称Python的版本不在给定范围内? - Why does Pip claim that a version of Python is not in a given range? Python package(tensorflow)显示pip列表和.__version__ZD148E6221F39893之间的版本不匹配 - Python package (tensorflow) displays mismatching versions between pip list and .__version__ output 在 Python 的 Pip 中,如何搜索与版本模式匹配的 package 的所有可能版本? - In Python's Pip, how can you search for all possible versions of a package, which match a version pattern? Pip == 6.0.6找不到以前的软件包版本,但是Pip == 1.5.6可以 - Pip==6.0.6 not finding previous package versions, yet Pip==1.5.6 does pip:安装软件包的版本不得超过其他软件包的版本 - pip: install package at version that don't bump versions of other packages
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM