Getting Started#
The conda-lockfiles plugin is integrated directly into the following conda commands:
conda env createconda export
The env create and export commands allow you to create environments from lockfiles or
save and share them, respectively.
Using conda env create to create environments from lockfiles#
In this example, we show how to create an environment from a lockfile generated with pixi:
conda env create --name my-env --format pixi-lock-v6 --file pixi.lock
Warning
This needs to be a version 6 format of the pixi lock file. Earlier versions may cause errors.
Using conda export to save lockfiles#
This example shows how to export environment we created above (my-env) as a
lockfile using the conda-lock-v1 format:
conda export --name my-env --env-spec=conda-lock-v1 --file conda-lock.yml
Using conda export to save lockfiles with a different platform#
If you have created an environment with the following command on the linux-64 platform:
conda create --name python-env --yes python
it’s possible to export it to a lockfile using the win-64 platform with the following command:
conda export --name python-env --format pixi-lock-v6 --platform win-64 --file pixi.lock
Warning
Currently, it is not possible to create an environment from a lockfile and then export it using a
different platform. For example, an environment created using a lockfile using the linux-64 platform
cannot be subsequently exported to the win-64 platform.
Tips on usage#
These lockfiles can be saved to your repositories and used in CI workflows for faster execution times
They can also be used with
conda-lockandpixiThis project is still in beta; please file bugs and feature requests here