Home  »  ArticlesGuidesHow ToSoftwareTechnologyTools   »   How to Install Anaconda on Ubuntu 24.04 Noble Numbat

How to Install Anaconda on Ubuntu 24.04 Noble Numbat

Anaconda is a popular open-source distribution of Python and R programming languages for scientific computing, data science, machine learning, and large-scale data processing. It simplifies package management and deployment, and it includes many popular data science and machine learning libraries. This comprehensive guide will walk you through the process of installing Anaconda on Ubuntu 24.04 Noble Numbat.

Prerequisites

Before you begin the installation, ensure that your system is up-to-date and you have administrative privileges. Open your terminal and execute the following commands:

$ sudo apt update
$ sudo apt upgrade

Step-by-Step Installation Guide

Step 1: Download the Anaconda Installer

Visit the official Anaconda Distribution page to download the latest version of the Anaconda installer script. You can use the following wget command to download the installer directly from your terminal:

$ wget https://repo.anaconda.com/archive/Anaconda3-2023.03-Linux-x86_64.sh

Make sure to check the website for the latest version and update the URL accordingly.

Step 2: Verify the Installer’s Integrity

It’s good practice to verify the integrity of the downloaded installer. You can find the SHA-256 checksum for the installer on the Anaconda distribution page. Use the sha256sum command to generate a checksum for the downloaded file and compare it with the one provided on the website:

$ sha256sum Anaconda3-2023.03-Linux-x86_64.sh

Ensure that the generated checksum matches the one provided on the Anaconda download page.

Step 3: Run the Anaconda Installer

Now, run the installer script:

$ bash Anaconda3-2023.03-Linux-x86_64.sh

Follow the prompts in the terminal to complete the installation. You’ll need to review and accept the license agreement, specify the installation location (the default is usually fine), and decide whether to initialize Anaconda by running conda init.

Step 4: Initialize Anaconda

If you chose to initialize Anaconda during the installation, the installer would automatically configure your system. If you opted out, you can manually initialize Anaconda by running:

$ source ~/anaconda3/bin/activate

Next, initialize Anaconda for your shell. For example, if you are using the Bash shell, you can run:

$ conda init bash

For other shells (e.g., zsh, fish), replace bash with the appropriate shell name.

Step 5: Verify the Installation

To verify that Anaconda is installed correctly, close and reopen your terminal, then run the following command to check the version of Anaconda:

$ conda --version

You should see output indicating the version of Conda that is installed, confirming that the installation was successful.

Post-Installation Configuration

Updating Anaconda

It’s a good idea to update Conda and all installed packages to their latest versions. Use the following commands to update Conda and Anaconda:

$ conda update conda
$ conda update anaconda

Creating and Managing Conda Environments

One of the key features of Anaconda is the ability to create and manage environments. Here’s how you can create a new Conda environment:

$ conda create --name myenv

Replace myenv with the name you want for your environment. To activate the environment, use:

$ conda activate myenv

To deactivate the environment, simply run:

$ conda deactivate

Installing Packages

With Anaconda, you can easily install packages using the conda command. For example, to install the numpy package, run:

$ conda install numpy

You can also install multiple packages at once:

$ conda install numpy pandas matplotlib

Removing Conda Environments

If you no longer need a Conda environment, you can remove it using the following command:

$ conda remove --name myenv --all

Replace myenv with the name of the environment you want to remove.

Conclusion

Installing Anaconda on Ubuntu 24.04 Noble Numbat is a straightforward process that unlocks powerful tools for data science, machine learning, and scientific computing. By following this comprehensive guide, you can set up Anaconda on your system and start leveraging its extensive library of packages and environments to streamline your workflows.

Whether you’re a data scientist, a machine learning engineer, or just someone who loves working with Python, Anaconda offers a robust and user-friendly platform to enhance your productivity and efficiency.

Found this article interesting? Follow Brightwhiz on Facebook, Twitter, and YouTube to read and watch more content we post.