Written by
Imran
on
on
Conda and Mamba Commands for Managing Virtual Environments
2
min read
Installing Mamba
conda install -n base -c conda-forge mambaAdding channels
conda config --add channels conda-forgeUpdating Mamba
mamba update -n base mambaFinding a Package
mamba repoquery search PACKAGESearching for dependencies
mamba repoquery depends -a PACKAGECreating an environment
mamba create -n ENV_NAME PACKAGEAdding/Updating software
mamba install -n ENV_NAME PACKAGE
mamba update -n ENV_NAME --allRemoving a package
mamba remove -n ENV_NAME PACKAGEUndoing changes to an environment
mamba list -n ENV_NAME --revisions
mamba install -n ENV_NAME --revision 1Show environment
conda env export --no-buildsClone an existing environment
conda create --name CLONE_ENV_NAME --clone ENV_NAMERemoving an environment
mamba env remove -n ENV_NAME
conda remove --name ENV_NAME --allExporting an environment
mamba env export -n ENV_NAME > ENV_NAME.yaml
conda list -e > ENV_NAME.txt- Windows:
conda env export -n ENV_NAME | findstr -v "prefix" > ENV_NAME.yaml- Linux:
conda env export -n ENV_NAME --no-builds | grep -v "prefix" > ENV_NAME.yamlImporting an environment
mamba env create --file ENV_NAME.yaml
conda env create --file ENV_NAME.yaml
conda create -n ENV_NAME --file ENV_NAME.txtDeactivate the Environment
conda deactivateViewing a list of your environments
conda info --envs
conda env list