zepWay

Conda/mamba cheatsheet

My personal advice:

  • Directly install mamba into a fresh new conda environment or install miniforge in the first place (then mamba is installed per default)
  • install pip in the default (base) target enviroment
  • install pip packages only if they aren’t available on conda

Create enviroment yml file

conda list -e > enviroment.yml

Create new enviroment

mamba create -n 'enviroment'

Create new enviroment based on a yml file

mamba env create --file requirements.yaml

List your enviroments

conda info --envs
conda env list

List all packages of the currently used and activated enviroment

mamba list

List specific conda package

mamba list 'package'

Delete a conda enviroment

conda remove --name myenv --all 

Install a single conda package in a activated enviroment (1)

mamba install 'package'

Install multiple conda packages in a activated enviroment (2)

mamba install 'package' 'package2'

Install a specific version of a package

mamba install 'package=3.2'

Show current solver

conda config --show-sources

Change solver to libmamba solver

conda --set solver libmamba

Change solver to classic solver

conda --set solver classic

Free disk space of unused packages

 conda clean --all