1. Download the Installer
Download the latest Miniconda installer using wget:
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
Tip: You can also verify the integrity of the installer using checksums available on the official Miniconda page.
2. Run the Installer
Navigate to the directory where the installer was downloaded and run:
bash Miniconda3-latest-Linux-x86_64.sh
3. Follow the Installation Prompts
- Accept the License Agreement: Scroll through the license terms and type
yesto accept. - Choose Installation Location: Press
Enterto accept the default location (~/miniconda3) or specify a different path. - Initialize Conda: Type
yeswhen prompted to initialize Conda. This ensures Conda is added to your shell startup file (e.g.,.bashrc).
4. Activate Conda
After installation, activate Conda:
source ~/.bashrc
Alternative: Close and reopen your terminal to automatically load Conda.
5. Verify Installation
Check if Conda was installed correctly:
conda --version
You should see the installed Conda version displayed.
6. Update Conda (Optional but Recommended)
Update Conda to the latest version:
conda update conda
Tip: You may also update all packages with:
conda update --all.
7. Create and Manage Environments
Create a new environment:
conda create --name myenv python=3.11
Activate the environment:
conda activate myenv
Deactivate when done:
conda deactivate
Tip: Environments help isolate projects and dependencies.
8. Uninstall Conda (Optional)
If needed, remove the installation:
rm -rf ~/miniconda3
Also, remove Conda initialization lines from your shell startup file (e.g., .bashrc).