4  Conda/Mamba

Mamba is a popular package manager in data science, scientific computing and bioinformatics, which is a successor to another package manager called Conda. Below we give instructions on how to use the Miniforge installer on all major operating systems.

WSL2 users

The instructions below are for a native Mamba Windows installer. If you are using WSL2 (our recommendation), then follow the instructions on the “Linux” tab.

  • Download the Miniforge3 installer from this link
  • Double-click the downloaded file to start the installation wizard
  • You may get a warning from Windows Defender

  • Click “More info” and then “Run anyway

  • Proceed with the installation accepting all the defaults

  • To use mamba you can search your windows menu for “miniforge” and click on the “Miniforge Prompt” application

  • This should open a terminal, which starts with the word (base).

  • Copy and paste the following commands to finish setting up your installation:

    conda config --add channels defaults
    conda config --add channels bioconda
    conda config --add channels conda-forge
    conda config --set channel_priority strict
    conda config --set remote_read_timeout_secs 1000

Open a terminal and copy/paste the following commands (this will install Mamba in its default location in the home directory):

curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
/bin/bash Miniforge3-$(uname)-$(uname -m).sh -b -p $HOME/miniforge3
rm Miniforge3-$(uname)-$(uname -m).sh
$HOME/miniforge3/bin/mamba init --all

Restart your terminal and confirm that your shell now starts with the word (base). Copy and paste the following commands to finish setting up your installation:

conda config --add channels defaults
conda config --add channels bioconda
conda config --add channels conda-forge
conda config --set channel_priority strict
conda config --set remote_read_timeout_secs 1000

Open a terminal and copy/paste the following commands (this will install Mamba in its default location in the home directory):

wget "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
bash Miniforge3-$(uname)-$(uname -m).sh -b -p $HOME/miniforge3
rm Miniforge3-$(uname)-$(uname -m).sh
$HOME/miniforge3/bin/mamba init

Restart your terminal and confirm that your shell now starts with the word (base). Copy and paste the following commands to finish setting up your installation:

conda config --add channels defaults
conda config --add channels bioconda
conda config --add channels conda-forge
conda config --set channel_priority strict
conda config --set remote_read_timeout_secs 1000

Finally, check your installation. The following command:

conda config --show channels

Should output:

channels:
  - conda-forge
  - bioconda
  - defaults

And this command:

mamba --version

Should output (the version numbers may be higher in your case):

mamba 1.4.2
conda 23.1.0