How can I source-control a Conda environment?

How can I source-control a Conda Environment?
I am looking for a solution that will enable saving a few files from which my I will be able to restore my current environment in case it will somehow get corrupt.
I would also like to be able to create a copy of my environment on another computer with WH similar to mine.

The simple solutions dsuch as the “conda env export” and “conda list --explicit” output file don’t work for complicated environment hat include both conda and pip installation. Sorce-controlling the list of installation commands don’t work either becuase sometime the pip packages are no longe avilable.

Please help

You might be interested in taking a look at pixi: https://pixi.sh/

We create a pixi.lock file that you can check into your VCS.

1 Like

Pixi is a great tool, and I highly recommend it.

If you somehow have a requirement to continue using conda/mamba, you can also look at conda-lock: GitHub - conda/conda-lock: Lightweight lockfile for conda environments