Anaconda is an essential tool for data scientists and developers working in Python and R. It simplifies package management and deployment, offering a collection of over 1500 data science packages. This guide provides detailed steps to install Anaconda on Ubuntu 24.04, including setting up environments and basic usage.
In this tutorial you will learn:
- Downloading and Installing Anaconda
- Completing the Installation Process
- Setting up the Environment
- Understanding and Managing Anaconda Environments
- Testing the Installation with a Simple Python Script

Installation Steps
The following steps will guide you through the process of installing Anaconda on your Ubuntu 24.04 system.
- Downloading the Anaconda Installer
Visit the Anaconda website and download the latest version of Anaconda for Linux. The installer file will typically be named likeAnaconda3-2023.09-0-Linux-x86_64.sh
. - Running the Installation Script
Open a terminal, navigate to the download directory, and execute the script:$ bash Anaconda3-2023.09-0-Linux-x86_64.shFollow the on-screen instructions to accept the license agreement and confirm installation settings. - Completing the Installation
The installation process will unpack and install Anaconda. During the process, choose to initialize Anaconda by updating your shell profile, enabling automatic activation of the base environment.Successful Anaconda installation on Ubuntu 20.04
- Setting Up the Environment
Restart your terminal or source the.bashrc
file to refresh the environment variables:$ source ~/.bashrcAfter this, you should see a(base)
prefix in your terminal, indicating the base Anaconda environment is active.https://de16671bd0e4d81ee22d2c49521c1802.safeframe.googlesyndication.com/safeframe/1-0-40/html/container.html - Understanding Anaconda Environments
Anaconda allows the creation of isolated environments for different projects. The(base)
environment is the default, but you can create and activate new environments as needed. To deactivate the base environment automatically on terminal startup, run:$ conda config –set auto_activate_base falseTo activate an environment manually, use:$ conda activate <env_name>To list installed anaconda environments run:$ conda env listTo return to the base environment:$ conda activate base Remember that you need to restart your terminal or source the.bashrc
file to refresh the environment variables. - Testing with a Simple Python Program
To test your installation, create a simple Python script,hello_world.py
, with the content:$ print(“Hello, World!”)Run the script in the Anaconda environment:$ python hello_world.pySuccessful output confirms a functional Anaconda installation.
Conclusion
Congratulations! You have successfully installed Anaconda on Ubuntu 22.04. This powerful platform is now ready for your data science and machine learning projects. With the knowledge of managing environments, you can maintain organized, efficient workflows and manage dependencies effectively for each project.