Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cloning environment with micromamba

Tags:

conda

mamba

It seems micromamba is missing a clone environment option, or is it just named differently?

  • Mamba's help micromamba create -n envname --help does not seem to show any clone-like option and
  • standard conda's conda create -n envname --clone oldenv doesn't seem to work.

If mamba is missing clone option, what is the reason for that?

like image 844
Smarty77 Avatar asked Mar 10 '26 08:03

Smarty77


1 Answers

Yeah, It does not have a cloning option yet

Minor Update

the command to create the environment failed with micromamba version 1.4.9, use the --file flag,

micromamba env create --name newenv --file oldenv.yaml

-- comment by gkaf

It's simply because it is designed as a lightweight, fast, and minimal version of mamba. The clone environment is a relatively complex feature, and it was not considered to be essential for the core functionality of micromamba.

Solution

There is a roundabout way though. As per what I know, you can export the current env as yaml and run micromamba env create to create a env from the yaml file.

Export the contents of the existing environment to a YAML file.

micromamba env export -n oldenv > oldenv.yaml

Create a new environment from the YAML file.

micromamba env create -n newenv -f oldenv.yaml

This should work, notify if it doesn't.

like image 66
Hind Sagar Biswas Avatar answered Mar 12 '26 00:03

Hind Sagar Biswas



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!