[英]Requirements.txt greater than equal to and then less than?
I have this line in my requirements file我的需求文件中有这一行
django>=1.10,<1.11
Does that mean I need to have Django version >= 1.10
and then less than 1.11
?这是否意味着我需要 Django 版本
>= 1.10
然后小于1.11
?
Yes .是的。 The pip manual [doc] has a section on the format of " requirement specifiers ".
pip 手册 [doc]有一节介绍了“需求说明符”的格式。 These are documented in PEP-508 [pep] and PEP-440 [pep] :
这些记录在PEP-508 [pep]和PEP-440 [pep] 中:
The comparison operator determines the kind of version clause:
比较运算符确定版本子句的类型:
~=
: Compatible release clause~=
: 兼容的发布条款==
: Version matching clause==
: 版本匹配子句!=
: Version exclusion clause!=
: 版本排除条款<=
,>=
: Inclusive ordered comparison clause<=
,>=
: 包含有序比较子句<
,>
: Exclusive ordered comparison clause<
,>
: 排他性有序比较子句===
: Arbitrary equality clause.===
:任意平等条款。The comma (
","
) is equivalent to a logical and operator: a candidate version must match all given version clauses in order to match the specifier as a whole.逗号 (
","
) 等效于逻辑和运算符:候选版本必须匹配所有给定的版本子句,以便与整个说明符匹配。
So in your case it means that the Django version is 1.10
or higher and not 1.11
or higher (so 1.10
is fine, 1.10.1
, as well, but not 1.11
, 1.11.1
, or 2.0.1
).因此,在您的情况下,这意味着 Django 版本是
1.10
或更高版本,而不是1.11
或更高版本(因此1.10
很好, 1.10.1
也可以,但不是1.11
、 1.11.1
或2.0.1
)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.