UbuntuUbuntu Based

How To Install Anaconda on Ubuntu 24.04 LTS

Install Anaconda on Ubuntu 24.04

In this tutorial, we will show you how to install Anaconda on Ubuntu 24.04 LTS. Anaconda is an industry-standard platform for data science and machine learning, offering a streamlined and efficient workflow for developers and researchers. It simplifies package management and environment setup, allowing users to focus on their projects rather than worrying about dependencies and compatibility issues. With its extensive collection of pre-built packages and tools, Anaconda enables users to perform complex data analysis, visualization, and model-building tasks with ease.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of Anaconda on Ubuntu 24.04 (Noble Numbat). You can follow the same instructions for Ubuntu 22.04 and any other Debian-based distribution like Linux Mint, Elementary OS, Pop!_OS, and more as well.

Prerequisites

  • A server running one of the following operating systems: Ubuntu and any other Debian-based distribution like Linux Mint.
  • It’s recommended that you use a fresh OS install to prevent any potential issues.
  • SSH access to the server (or just open Terminal if you’re on a desktop).
  • An active internet connection. You’ll need an internet connection to download the necessary packages and dependencies.
  • An Ubuntu 24.04 system with root access or a user with sudo privileges.

Install Anaconda on Ubuntu 24.04 LTS Noble Numbat

Step 1. Updating the Package Repository.

 It’s always a good practice to apply the latest system updates to maintain optimal performance and security. Open the Terminal and run the following commands to update your system:

sudo apt update

This command will fetch the latest package information from the Ubuntu repositories, allowing you to install the most recent version of Anaconda and its dependencies. Updating the package repository is crucial to maintaining the security and stability of your system.

Step 2. Installing Anaconda on Ubuntu 24.04.

Next, navigate to the official Anaconda download page using your web browser or use the wget command to download the latest Anaconda installer script directly:

wget https://repo.anaconda.com/archive/Anaconda3-2024.02-1-Linux-x86_64.sh

The download may take a few minutes, depending on your internet connection speed. Once the download is complete, you will have the Anaconda installer script ready for execution.

To ensure the integrity of the downloaded Anaconda installer, it is recommended to verify the SHA-256 hash of the file. The hash value serves as a unique fingerprint that allows you to confirm that the file has not been corrupted or tampered with during the download process.

sha256sum Anaconda3-2024.02-1-Linux-x86_64.sh

Compare the output with the official hash provided on the Anaconda website. If they match, proceed to the next step.

Navigate to the directory where the installer script is located and run the script using the bash command:

bash Anaconda3-2024.02-1-Linux-x86_64.sh

Follow the on-screen prompts:

  1. Press Enter to review the license agreement.
  2. Scroll through the license agreement by pressing Enter or Space.
  3. Type yes to accept the license terms.
  4. Press Enter to confirm the default installation location or specify a different location.

The installation process may take several minutes. Once completed, you will be prompted to initialize Anaconda. Type yes to initialize it.

Step 3. Setting Up the Environment.

To activate the changes made by the installer, update your shell profile by sourcing the .bashrc file:

source ~/.bashrc

Verify the installation by checking the list of installed packages:

conda list

Update Anaconda to the latest version:

conda update conda

Step 4. Using Anaconda Navigator.

Anaconda Navigator is a graphical user interface that allows you to manage packages, environments, and launch applications. To start Anaconda Navigator, use the following command:

anaconda-navigator

Explore the interface to create and manage environments, install packages, and launch applications like Jupyter Notebook and Spyder.

Step 5. Creating and Managing Environments.

Creating isolated environments is one of Anaconda’s key features, allowing you to manage dependencies for different projects. To create a new environment, use the following command:

conda create --name myenv

Activate the environment:

conda activate myenv

To deactivate the environment, use:

conda deactivate

Install packages within the environment:

conda install package_name

Step 6. Installing Jupyter Notebook.

Jupyter Notebook is an essential tool for data scientists, providing an interactive environment for writing and running code. Install Jupyter Notebook in the base environment:

conda install jupyter

Launch Jupyter Notebook:

jupyter notebook

Create a new notebook and run a simple Python script to ensure everything is working correctly.

Congratulations! You have successfully installed Anaconda. Thanks for using this tutorial for installing Anaconda on the Ubuntu 24.04 LTS system. For additional help or useful information, we recommend you check the Anaconda website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!

r00t

r00t is an experienced Linux enthusiast and technical writer with a passion for open-source software. With years of hands-on experience in various Linux distributions, r00t has developed a deep understanding of the Linux ecosystem and its powerful tools. He holds certifications in SCE and has contributed to several open-source projects. r00t is dedicated to sharing her knowledge and expertise through well-researched and informative articles, helping others navigate the world of Linux with confidence.
Back to top button