Installing Mamba in Linux

When You need just a little more speed and manage environments easily

Installing Mamba in Linux
Photo by Rubaitul Azad / Unsplash

Download the Install Script

Using Wget:

wget -O Miniforge3.sh "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"

Using axel:

Install axel (If you dont already have it):

sudo apt install axel -y

and now download the script:

axel --output=Miniforge3.sh "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"

Install the script:

bash Miniforge3.sh -b -p "${HOME}/conda"

Configure shell:

source "/home/ubuntu/conda/etc/profile.d/conda.sh"
mamba shell init
source ~/.bashrc

Validate Install

conda:

conda

Output:

usage: conda [-h] [-v] [--no-plugins] [-V] COMMAND ...

conda is a tool for managing and deploying applications, environments and packages.

options:
  -h, --help            Show this help message and exit.
  -v, --verbose         Can be used multiple times. Once for detailed output,
                        twice for INFO logging, thrice for DEBUG logging, four
                        times for TRACE logging.
  --no-plugins          Disable all plugins that are not built into conda.
  -V, --version         Show the conda version number and exit.

commands:
  The following built-in and plugins subcommands are available.

  COMMAND
    activate            Activate a conda environment.
    clean               Remove unused packages and caches.
    commands            List all available conda subcommands (including those
                        from plugins). Generally only used by tab-completion.
    compare             Compare packages between conda environments.
    config              Modify configuration values in .condarc.
    create              Create a new conda environment from a list of
                        specified packages.
    deactivate          Deactivate the current active conda environment.
    doctor              Display a health report for your environment.
    export              Export a given environment
    info                Display information about current conda install.
    init                Initialize conda for shell interaction.
    install             Install a list of packages into a specified conda
                        environment.
    list                List installed packages in a conda environment.
    notices             Retrieve latest channel notifications.
    package             Create low-level conda packages. (EXPERIMENTAL)
    remove (uninstall)  Remove a list of packages from a specified conda
                        environment.
    rename              Rename an existing environment.
    repoquery           Advanced search for repodata.
    run                 Run an executable in a conda environment.
    search              Search for packages and display associated information
                        using the MatchSpec format.
    update (upgrade)    Update conda packages to the latest compatible
                        version.

mamba

mamba

Output:

Version: 2.1.1 



/home/ubuntu/conda/bin/mamba [OPTIONS] [SUBCOMMAND]


OPTIONS:
  -h,     --help              Print this help message and exit 
          --version           

Configuration options:
          --rc-file FILE1 FILE2... 
                              Paths to the configuration files to use 
          --no-rc             Disable the use of configuration files 
          --no-env            Disable the use of environment variables 

Global options:
  -v,     --verbose           Set verbosity (higher verbosity with multiple -v, e.g. -vvv) 
          --log-level ENUM:value in {critical->5,debug->1,error->4,info->2,off->6,trace->0,warning->3} OR {5,1,4,2,6,0,3} 
                              Set the log level 
  -q,     --quiet             Set quiet mode (print less output) 
  -y,     --yes               Automatically answer yes on prompted questions 
          --json              Report all output as json 
          --offline           Force use cached repodata 
          --dry-run           Only display what would have been done 
          --download-only     Only download and extract packages, do not link them into 
                              environment. 
          --experimental      Enable experimental features 

Prefix options:
  -r,     --root-prefix PATH  Path to the root prefix 
  -p,     --prefix PATH       Path to the target prefix 
          --relocate-prefix PATH 
                              Path to the relocation prefix 
  -n,     --name NAME         Name of the target prefix 

SUBCOMMANDS:
  shell                       Generate shell init scripts 
  create                      Create new environment 
  install                     Install packages in active environment 
  update                      Update packages in active environment 
  repoquery                   Find and analyze packages in active environment or channels 
  remove, uninstall           Remove packages from active environment 
  list                        List packages in active environment 
  package                     Extract a package or bundle files into an archive 
  clean                       Clean package cache 
  config                      Configuration of micromamba 
  info                        Information about micromamba 
  constructor                 Commands to support using micromamba in constructor 
  env                         See `mamba/micromamba env --help` 
  activate                    Activate an environment 
  run                         Run an executable in an environment 
  ps                          Show, inspect or kill running processes 
  auth                        Login or logout of a given host 
  search                      Find packages in active environment or channels 
                              This is equivalent to `repoquery search` command