Install Conda: Anaconda or Miniconda¶
This guide provides instructions for installing either Anaconda or Miniconda into a custom directory, creating a Python environment, and activating it.
Overview¶
Miniconda: A minimal Conda installer (recommended for lightweight setups).
Anaconda: A full-featured Conda distribution with over 150 pre-installed packages.
Note
Miniconda is recommended for users who want to install only the packages they need.
Install Miniconda in a Custom Directory¶
Download the Installer
Choose your OS and download from the official Miniconda page:
https://docs.conda.io/en/latest/miniconda.html
For Linux:
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.shInstall into a Custom Directory
Replace /path/to/miniconda3_custom with your desired location:
bash Miniconda3-latest-Linux-x86_64.sh -b -p /path/to/miniconda3_custom
Note
In HPC cluster, it is recommended to set /path/to/miniconda3_custom to a location which is accessible by all nodes. Read you HPC documentation carefully and check whether conda is already installed and available as module or not.
Enable the ‘conda’ Command
Important
To avoid using the full path (/path/to/miniconda3_custom/bin/conda) every time, do the follwing:
/path/to/miniconda3_custom/bin/conda init source ~/.bashrc # or ~/.zshrc, depending on your shell
After this, conda will be available as a global command.
Install Anaconda in a Custom Directory¶
Download the Installer
Visit https://www.anaconda.com/products/distribution and download the installer.
For Linux:
wget https://repo.anaconda.com/archive/Anaconda3-latest-Linux-x86_64.shInstall into a Custom Directory
Replace /path/to/anaconda3_custom with your desired location:
bash Anaconda3-latest-Linux-x86_64.sh -b -p /path/to/anaconda3_custom
Note
In HPC cluster, it is recommended to set /path/to/anaconda3_custom to a location which is accessible by all nodes.
Enable the ‘conda’ Command
Important
To avoid using the full path (/path/to/anaconda3_custom/bin/conda) every time, do the follwing:
/path/to/anaconda3_custom/bin/conda init source ~/.bashrc # or ~/.zshrc