What do = and == etc. mean when specifying conda and pip package version numbers in YAML files

Viewed 104

We use YAML files to specify our conda and pip environments. In them we can specify which version numbers we need using, for example, any one of these lines

- cudatoolkit=10.2.89
- cudatoolkit=10.2.*
- cudatoolkit==10.2.89
- cudatoolkit==10.2.*

I am having trouble finding the documentation for what == vs. = means in these package requirements and what other restrictions could be written and how.

What is the difference in this setting between = and ==? Do these meanings differ between conda and pip? Where is the correct documentation (Google & Bing are not great at searching for symbols like those)?

1 Answers

In PEP 440, pip's version specification operators include only == which means to match the exact version specified. Conda's package matching specifications include == which is the same as PEP 440's == for exact version specification and their own operator, =, which is for fuzzy package matching.

Related