In requirements.txt, what does tilde equals (~=) mean?

It means it will select the latest version of the package, greater than or equal to 0.6.10, but still in the 0.6.* version, so it won’t download 0.7.0 for example. It ensures you will get security fixes but keep backward-compatibility, if the package maintainer respects the semantic versioning (which states that breaking changes should occur only in major versions).

Or, as said by PEP 440:

For a given release identifier V.N , the compatible release clause is approximately equivalent to the pair of comparison clauses:

>= V.N, == V.*

Leave a Comment