[英]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.