conda-lockfiles
Support for different lockfiles in the conda CLI tool.
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.
A lockfile is a machine-generated file that records the exact versions and sources of every package
in a given environment, including all dependencies, in its fully-resolved state. Unlike with
environment.yml, requirements.txt, or similar files, lockfiles do not require the environment to be
solved again, which might introduce differences from the original environment. Lockfiles can reproduce
exact environments across different machines and points in time again and again.
The basic usage is:
# Create environment from lockfile
conda create --name ENV-NAME --format FORMAT --file /path/to/lockfile
# Export current environment to lockfile
conda export --name ENV-NAME --format FORMAT --file /path/to/lockfile
If conda recognizes your lockfile's format, the --format flag is optional with conda create.
Currently supported lockfile formats are:
conda-lock.yml/conda-lock.yaml—conda-lock-v1(alias:conda-lock)pixi.lock—rattler-lock-v6(aliases:pixi,pixi-lock-v6)
The version-pinned names (such as -v1, -v6) never change meaning. The short
aliases track the current-stable version. For information on when to use which name,
see format aliases.
Installation
conda-lockfiles is a conda plugin and must be installed in the base environment:
conda install --name 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 create --file FILE
If conda is unable to determine the file format:
conda create --file FILE --format FORMAT
See conda create docs for more details.
Examples
Export one conda-lock file with several platforms (adjust platforms to what you need; exporting a platform different than the host may fail):
conda export \
--name myenv \
--format conda-lock-v1 \
--file conda-lock.yml \
--platform linux-64 \
--platform osx-64
Create an environment from that lockfile:
conda create --name myenv --file conda-lock.yml
# if the format is not auto-detected:
conda create --name myenv --file dev-lock.yml --format conda-lock-v1
Pixi / rattler lock v6:
conda export --name myenv --format pixi --file pixi.lock
conda create --name myenv --file pixi.lock --format pixi
pixi resolves to rattler-lock-v6 today. Use --format rattler-lock-v6 in committed lockfiles
and CI so a future alias flip doesn't change the written format.
More information and example workflows are available on our online documentation.
Contributing
Please refer to CONTRIBUTING.md.
Metadata
Release files for conda-lockfiles 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| conda_lockfiles-0.2.2.tar.gz | 224.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| conda_lockfiles-0.2.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 242.6 kB
Release files / conda_lockfiles-0.2.2.tar.gz
| Download URL | conda_lockfiles-0.2.2.tar.gz |
|---|---|
| Size | 224.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3f1d24b655fc62e557ea2b52aecb71f4643e4185ab0d962028dfc6dec625edf0
|
|
BLAKE2b-256 checksum How to use checksums |
9a8e348af0ee1c3643aaac3bb4c183ff8c9920dce36ea71c0d443f7f690f5ff2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 23, 2026.
Transparency logRelease files / conda_lockfiles-0.2.2-py3-none-any.whl
| Download URL | conda_lockfiles-0.2.2-py3-none-any.whl |
|---|---|
| Size | 18.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ff8e3534c80fc4f99bd9f80773d1bb361a10e5d85401731f1ce8ecdc85469fe3
|
|
BLAKE2b-256 checksum How to use checksums |
fc9d6285ac889c1e52cb62367e45f978f8693b5e95b807692889588f427e9f59
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 23, 2026.
Transparency log