Is it possible to specify version ranges in an environment.yml file for Conda packages?
The official documentation mentions a few examples that rely on the asterisks (*) and I am wondering if that is the only feature or whether Conda supports other more sophisticated version ranges such as those supported by npm.
For example, is it possible to install any patch version that is higher or equal to 1.2.3
(e.g., 1.2.10
would be fine but 1.3.0
is not)?
Update Conda Environments Using a YAML File Once you have created a conda environment, you can update it anytime by first activating the environment and then running the conda env update command.
I think/assume that the syntax specifying versions is the one documented at Package match specifications.
So you would write - numpy >=1.2.3,<1.3
(space after numpy, no space after the comma - not tested).
BTW, I couldn't find any documentation describing the structure of the environment file environment.yml
. creating-an-environment-from-an-environment-yml-file refers to Creating an environment file manually and vice-versa.
You could write something like:
dependencies: - numpy>=1.2.3, <1.3
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With