Anaconda, Conda, and Mamba
- Anaconda - full distribution of Python and R for scientific computing and data science, comes with Conda and preconfigured environments
- Conda - package and environment manager for Python and other langs
- Miniconda - minimal installer for Conda - smaller, faster, more flexible - can still install all packages
- Miniforge -like Miniconda but with additional repos and conda-forge is default
- Mamba - fast, drop-in replacement for Conda, designed to improve performance, especially when installing and resolving packages.
Full Anaconda install
wget https://repo.anaconda.com/anaconda3/Anaconda3-latest-Linux-x86_64.sh
bash Anaconda3-latest-Linux-x86_64.sh
Miniconda install
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh # download
bash Miniconda3-latest-Linux-x86_64.sh # install
conda init # initialize
source ~/.bashrc # source bashrc
conda update conda # update
conda --version # check
Install Miniforge
wget https://github.com/conda-forge/miniforge/releases/download/4.10.3-1/Miniforge3-Linux-x86_64.sh
bash Miniforge3-Linux-x86_64.sh
... normal conda steps ...
Conda Commands
conda create --name myenv # create env
conda create --name myenv python=3.9 # create env with specific python version
conda create --name myenv numpy # create env with package already installed
conda env remove --name myenv # remove env ( after deactivate )
conda activate myenv # active env
conda deactivate # deactivate env
conda install numpy # install package
conda install numpy pandas scipy # install multiple packages
conda remove numpy # remove package
conda list # list packages
conda info --envs # list envs
Repos:
- Anaconda repository
- conda-forge - community-driven repo
Envs located in one of these dirs:
- ~/miniconda3/envs/ # If using Miniconda
- ~/anaconda3/envs/ # If using Anaconda
Install Mamba
conda activate base
conda install mamba -c conda-forge
mamba --version
Mamba Commands
Almost the same as conda, some are the same:
mamba create --name myenv python=3.9
conda activate myenv # Mamba uses the same activate command as Conda
mamba install numpy pandas
mamba env list