Mamba Basics

mamba is a package manager for Python. It is a reimplementation of conda in C++. The syntax is the same as conda, but it is much faster. It is recommended to use mamba instead of conda for package management.

It is recommended to create a new environment for each project and leave the base environment untouched.

In the following, we assume the environment name is cs101.

See Uninstalling Anaconda for more details.

See Mambaforge for more details.

For Linux and macOS:

1
2
curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-$(uname)-$(uname -m).sh"
bash Mambaforge-$(uname)-$(uname -m).sh

For Windows:

Download the installer from Mambaforge and run it.

Enable the options to “Create start menu shortcuts” and “Add Miniforge3 to my PATH environment variable”.

Open a miniforge Prompt from Start Menu. Now Try:

1
conda init powershell
1
mamba config --set auto_activate_base false

Add the following lines to settings.json:

1
2
    "python.condaPath": "~/mambaforge/condabin/conda",
    "python.defaultInterpreterPath": "~/mambaforge/envs/cs101/bin/python",
1
mamba create -n cs101
1
mamba activate cs101
1
mamba install -y numpy matplotlib scipy pandas sympy numba jupyterlab plotly pytest
1
pip install rocket-fft
1
pip install -e .

In this way, the package will be installed in the current environment and the changes will be reflected immediately.

1
mamba deactivate
1
mamba env list
1
mamba remove -n cs101 --all