How to Install Anaconda Python on Ubuntu 24.04
Complete guide to install Anaconda on Ubuntu 24.04 LTS with SHA-256 checksums, Conda environment setup, package management, and Jupyter tips.

6 min read
Complete guide to install Anaconda on Ubuntu 24.04 LTS with SHA-256 checksums, Conda environment setup, package management, and Jupyter tips.
- Prerequisites and Supported Releases
- Step 1: Installing Prerequisites and System Dependencies
- Step 2: Downloading the Official Anaconda Linux Installer
Data science engineering, machine learning research, and numerical computing workflows require pre-configured software stacks bundling linear algebra libraries, statistical packages, and interactive notebook runtimes. When you install anaconda on ubuntu 24.04, you deploy an all-in-one data science platform that includes over 250 scientific computing packages (such as NumPy, Pandas, SciPy, Matplotlib, and Scikit-Learn) alongside the powerful conda package and environment management system.
Unlike standard Python virtual environments created via venv, Conda is a language-agnostic package manager that handles non-Python binary dependencies, CUDA drivers, and compiled C/Fortran libraries automatically. This tutorial guides you through acquiring the installer, performing SHA-256 cryptographic verification, configuring environment initialization, managing Conda virtual environments, and preventing common shell path conflicts.
Anaconda is the world's most widely adopted Python and R distribution for data science, artificial intelligence, and machine learning workloads. This comprehensive tutorial walks you through how to install Anaconda on Ubuntu 24.04 LTS, verify installer cryptographic checksums, manage isolated Conda virtual environments, and launch Jupyter Notebook.
Prerequisites and Supported Releases
This guide is thoroughly verified on Ubuntu 24.04 LTS (Noble Numbat) & Ubuntu 22.04 LTS. The instructions apply cleanly to cloud instances (AWS EC2, Google Compute Engine, DigitalOcean, Hetzner), bare-metal servers, and local virtual machines.
Before proceeding, ensure you have the following requirements satisfied:
- A 64-bit installation of Ubuntu 24.04 LTS (Desktop or Server).
- A standard non-root user account with sudo administrative privileges.
- At least 5 GB of free disk space for Anaconda binaries and package caches.
- An active Internet connection to download installer archives and packages.
Step 1: Installing Prerequisites and System Dependencies
The libgl1-mesa-glx package provides OpenGL rendering libraries utilized by graphical Anaconda tools such as Anaconda Navigator and Matplotlib.
# Refresh package lists and install retrieval dependencies
sudo apt update
sudo apt install -y curl bzip2 libgl1-mesa-glx
Step 2: Downloading the Official Anaconda Linux Installer
Anaconda is distributed as a self-extracting shell installer script. Navigate to your temporary directory and download the latest 64-bit x86 Linux installer from the official Anaconda distribution mirror.
Use curl to fetch the installer script:
# Navigate to /tmp
cd /tmp
# Download the latest Anaconda3 installer for Linux x86_64
curl -O https://repo.anaconda.com/archive/Anaconda3-2024.06-1-Linux-x86_64.sh
Step 3: Cryptographically Verifying the Installer SHA-256 Checksum
Compare the computed 64-character hexadecimal string against the published checksum on the official Anaconda website before proceeding with execution.
# Compute the SHA-256 checksum of the downloaded file
sha256sum Anaconda3-2024.06-1-Linux-x86_64.sh
# Sample output:
# c5b7f16ef0a41d50b449b2c34cb2c48da40e29b13936081e649537ff5a3b934b Anaconda3-2024.06-1-Linux-x86_64.sh
Step 4: Running the Anaconda Installation Script
Execute the downloaded shell installer using standard bash. Do NOT execute the installer using sudo; Anaconda should always be installed within your personal user directory to avoid permission conflicts when updating packages.
Run the installer script:
# Run the installer as your normal user
bash Anaconda3-2024.06-1-Linux-x86_64.sh
Navigating the Interactive Prompts
1. License Agreement: Press Enter to begin viewing the End User License Agreement. Press the Spacebar repeatedly to scroll to the bottom, then type yes and press Enter to accept the terms.
2. Installation Location: When prompted for the install location (defaulting to /home/username/anaconda3), press Enter to accept the default path.
3. Conda Initialization: At the prompt 'Do you wish to update your shell profile by running conda init? [yes|no]', type yes. This appends Conda initialization scripts to your ~/.bashrc file.
Step 5: Activating the Environment and Managing Base Shell Behavior
To activate the Anaconda environment and update your terminal's PATH, source your updated shell configuration file.
Once sourced, your terminal prompt will display a (base) prefix indicating that the default Conda environment is active.
# Source ~/.bashrc to load Conda into your active session
source ~/.bashrc
# Verify the installed Conda and Python versions
conda --version
python --version
Disabling Automatic Base Activation (Recommended for Sysadmins)
By default, Conda activates its (base) environment on every new terminal session, overriding Ubuntu's system Python. If you prefer to activate Conda manually only when working on data science projects, disable auto-activation:
# Prevent conda base from automatically activating on terminal startup
conda config --set auto_activate_base false
Step 6: Creating and Managing Isolated Conda Environments
Best practices dictate never installing project dependencies directly into the root (base) environment. Instead, create isolated environments for individual projects with pinned Python versions.
Create a new environment named py311-ds running Python 3.11 with core scientific packages:
# Create an isolated environment with Python 3.11, pandas, and scikit-learn
conda create --name py311-ds python=3.11 pandas scikit-learn matplotlib -y
# Activate the newly created environment
conda activate py311-ds
# Verify the active environment's Python location
which python
# Deactivate the environment when finished
conda deactivate
Step 7: Launching Jupyter Notebook and Updating Anaconda
Anaconda includes Jupyter Notebook and JupyterLab out of the box. To launch the interactive browser-based notebook interface, run:
Jupyter launches an internal web server and opens the interactive dashboard in your default browser.
# Launch Jupyter Notebook from your terminal
jupyter notebook &
# Update all packages in the active Conda environment to their latest versions
conda update --all -y
Step 8: Completely Uninstalling Anaconda from Ubuntu 24.04
Finally, open ~/.bashrc in a text editor and delete the code block delineated between # >>> conda initialize >>> and # <<< conda initialize <<<.
# Remove the main Anaconda directory
rm -rf ~/anaconda3
# Remove hidden configuration and cache directories
rm -rf ~/.conda ~/.continuum
Troubleshooting and Common Errors
When configuring Ubuntu servers, unexpected permission errors, network timeouts, or lock contention can occur. Review these common issues and verified resolutions:
conda: command not found after running installer.
Cause: The terminal session was not reloaded after the installer updated ~/.bashrc.
Resolution: Source your bash profile manually: source ~/.bashrc or export PATH: export PATH=$HOME/anaconda3/bin:$PATH.
source ~/.bashrc
Conda environment solving hangs indefinitely during package installation.
Cause: The default classic solver struggles with complex dependency trees.
Resolution: Switch to the high-performance Libmamba solver: conda install -n base conda-libmamba-solver && conda config --set solver libmamba.
conda config --set solver libmamba
Jupyter Notebook fails to launch in browser: 'No web browser found'.
Cause: Running on a headless server without a desktop display or browser installed.
Resolution: Launch Jupyter without a browser and copy the localhost token link: jupyter notebook --no-browser --port=8888.
jupyter notebook --no-browser --port=8888
Security Best Practices and Hardening
Never install or execute Anaconda using sudo.
Installing packages under root alters permissions on ~/anaconda3 and exposes your host operating system to supply-chain risks.
Always manage Conda as a standard unprivileged user.
Prioritize packages from the community-vetted conda-forge channel over untrusted third-party channels, and lock production environment specifications using conda env export > environment.yml.
Periodically audit active virtual environments for outdated dependencies and known CVEs using automated supply chain scanning tools.
Related Ubuntu Tutorials and Documentation
Deepen your Linux system administration skills with our related production-tested guides:
- How to Install Python on Ubuntu 24.04 LTS — Compare Anaconda with native Ubuntu Python 3 and virtual environment management.
- How to Install Python and Pip on Ubuntu — Configure system-wide pip package installations and virtual environments.
- How to Install Visual Studio Code on Ubuntu 24.04 — Configure the VS Code Python extension to automatically detect Conda environments.
Authoritative References and Official Documentation

The Linux Command Line, 2nd Edition: A Complete Introduction
Frequently Asked Questions
Quick answers to common questions and configurations
pip install <package> inside an activated Conda environment. However, best practice is to install packages via conda install first whenever available, and use pip only for packages not present in the Conda or conda-forge channels.conda env list or conda info --envs. The active environment is marked with an asterisk (*).(base) label indicates that Conda's default root environment is currently active in your shell. To prevent this from loading automatically, run conda config --set auto_activate_base false.Editorial Disclosure: Website Vidya is supported by our readers. When you purchase hosting, tools, or software through our verified partner links, we may earn an affiliate commission at no extra cost to you. We only recommend solutions we trust and rigorously verify.
Rajesh Ray
I’m Rajesh Rai, a full-stack developer, Linux administrator, and technology enthusiast passionate about making complex technology easier to understand and use.
Most Read Guides
TrendingUbuntu Server Not Booting? 10 Simple Steps to Fix It Fast
How to Create a 3D Button in HTML and CSS: Easy Steps
How to Install Python and Pip on Ubuntu 24.04 LTS
How to Install Nginx on Ubuntu 24.04
How to Install Python on Ubuntu 24.04 LTS
Related Technical Guides
Tested runbooks, server administration walkthroughs, and troubleshooting guides
Join the Conversation & Perspective
Have thoughts, counterpoints, or reflections on this story? Engage directly with fellow readers and editorial contributors.
No comments on this guide yet. Be the first to share your thoughts or ask a question!