If you’re starting with Python and want a lightweight way to manage packages and environments, Miniconda is a great choice. It provides Conda, a powerful tool for creating isolated environments and managing Python packages, without all the extras included in Anaconda.
This guide walks you step-by-step through installing and setting up Miniconda on Ubuntu, using the terminal installer. We’ll also cover how to install Jupyter Notebook for interactive coding.
1. Download Miniconda
Option A – With wget (recommended for servers and desktops)
Open a terminal (Ctrl+Alt+T) and download the latest installer:
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
This URL always points to the latest stable release.
Option B – With curl
If you prefer curl:
curl -O https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
2. Install Miniconda
Make the installer executable:
chmod +x Miniconda3-latest-Linux-x86_64.sh
Run it:
bash Miniconda3-latest-Linux-x86_64.sh
Follow the prompts:
- Press Enter to continue
- Review and accept the license terms (
yes) - Choose an install location (default:
~/miniconda3)
3. Initialize Conda
At the end of installation, you’ll be asked whether you want to initialize Conda:
✔ Recommended: say yes. This updates your shell startup file (~/.bashrc on Ubuntu by default) so Conda works in every new terminal session.
❌ Skip if you want manual control (you can run conda init later).
If you skipped earlier, run:
conda init bash
Restart your terminal. You should see (base) in your prompt, showing that the base Conda environment is active.
Check Conda’s version to confirm installation:
conda --version
4. Create and Manage Environments
Create a new environment with Python 3.11:
conda create -n myenv python=3.11
Activate it:
conda activate myenv
Install packages inside the environment:
conda install numpy pandas
Deactivate when done:
conda deactivate
5. Install Jupyter Notebook
With Conda ready, you can easily install Jupyter Notebook:
conda install jupyter notebook
Launch it:
jupyter notebook
A browser window will open. Click New → Python 3 to start a notebook.
Try running:
print("Hello, world!")
6. Troubleshooting
- conda: command not found → Run
conda init bashand restart your terminal. - Multiple Python installs → Keep Conda separate; avoid mixing with system Python.
- Reinstall from scratch → Delete
~/miniconda3and reinstall.
🎯 Final Notes
- Beginners: Terminal install is straightforward and works everywhere.
- Advanced users: You can automate installation with scripts — useful for servers.
- Always create separate Conda environments for each project.
- Jupyter Notebook integrates seamlessly with Conda environments — just activate the one you need before launching.
📌 Notes for Other Distros
- Fedora, CentOS, RHEL: The steps are identical, but Conda usually initializes in
~/.bashrcor~/.bash_profile. - Arch Linux / Manjaro: Same installation process, but users often prefer
zsh→ runconda init zshinstead. - WSL (Ubuntu on Windows): Works the same as native Ubuntu. Make sure Windows firewall allows Jupyter Notebook to open in your browser.