conda-lock

raw JSON →
4.0.0 verified Fri May 01 auth: no python

Lightweight lockfile manager for conda environments. Version 4.0.0 requires Python >=3.10; supports conda, mamba, and micromamba. Frequent releases with active maintenance.

pip install conda-lock
error KeyError: 'pkgs_dirs'
cause Bug in conda-lock when parsing conda configuration with missing pkgs_dirs key.
fix
Upgrade to conda-lock >=2.5.8 (backported fix) or >=3.0.0.
error TypeError: expected string or null, got 'int'
cause Incompatibility with newer pydantic or dulwich in conda-lock v3 prior to 3.0.4.
fix
Upgrade to conda-lock >=3.0.4.
breaking Conda-lock v4 drops support for Python 3.9.
fix Upgrade to Python >=3.10.
gotcha When using --strip-auth, the port for private PyPI repos is also stripped, breaking authentication on non-standard ports.
fix Use conda-lock >=3.0.2 or manually preserve the port.
gotcha The --check-input-hash flag is disabled when --strip-auth is used in v3.0.1, causing unnecessary relocking.
fix Upgrade to conda-lock >=3.0.2.
gotcha Mamba/micromamba versions 2.0.0 through 2.0.6 are incompatible with conda-lock v3. It only supports <2 or >=2.0.7.
fix Use mamba/micromamba <2 or >=2.0.7. Check executable with --log-level=DEBUG.
conda install conda-lock -c conda-forge

Generate a conda lockfile from an environment.yml. Run in directory with environment.yml. Produces files like conda-linux-64.lock.

conda-lock --file environment.yml