Skip to content

conda-incubator/conda-lockfiles

conda-lockfiles

Support for different lockfiles in the conda CLI tool.

Important

This project is still in early stages of development. Don't use it in production (yet). We do welcome feedback on what the expected behaviour should have been if something doesn't work!

What is this?

conda-lockfiles adds support for additional lockfile formats to conda. It supports different types of lockfiles from the ecosystem like conda-lock or pixi.

The basic usage is:

# Create environment from lockfile
conda env create -n ENV-NAME --env-spec=FORMAT --file=/path/to/lockfile

# Export current environment to lockfile
conda export -n ENV-NAME --format=FORMAT --file=/path/to/lockfile

Currently supported lockfile formats:

  • conda-lock.yml (conda-lock-v1)
  • pixi.lock (rattler-lock-v6 or pixi-lock-v6)

Installation

This is a conda plugin and must be installed in the base environment:

conda install -n base conda-forge::conda-lockfiles

Usage

Creating a lockfile for the current environment

conda export --format=FORMAT --file=FILE

To specify additional platforms:

conda export --format=FORMAT --file=FILE [--override-platforms] --platform=PLATFORM ...

See conda export docs for more details.

Creating a new environment from a lockfile

conda env create --file=FILE

If conda is unable to determine the file format:

conda env create --file=FILE --env-spec=FORMAT

See conda env create docs for more details.

More information is available on our documentation.

Contributing

Please refer to CONTRIBUTING.md.

About

Support for different lockfiles in the conda CLI tool.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Contributors 8