Categories: Ubuntu

Install Conda on Ubuntu 24.04

Python and R programming languages rely on Anaconda as their package and environment manager. With Anaconda, you will get tons of the necessary packages for your data science, machine learning, or other computational tasks.To utilize Anaconda on Ubuntu 24.04, install the conda utility for your Python flavor. This post shares the steps for installing conda for Python 3, and we will install version 2024.2-1. Read on!

How to Install conda n Ubuntu 24.04

Anaconda is an open-source platform and by installing conda, you will have access to it and use it for any scientific computational tasks, such as machine learning. The beauty of Anaconda lies in its numerous scientific packages, ensuring you can freely use it for your project needs.

Sponsored

Installing conda on Ubuntu 24.04 follows a series of steps, which we’ve discussed in detail.

Step 1: Downloading the Anaconda Installer
When installing Anaconda, you should check and use the latest version of the installer script. You can access all the latest Anaconda3 installer scripts from the Anaconda Downloads Page.

As of writing this post, we have version 2024.2-1 as the latest version, and we can go ahead and download it using curl.

$ curl https://repo.anaconda.com/archive/Anaconda3-2024.2-1-Linux-x86_64.sh –output anaconda.sh

Ensure you change the version when using the above command. Also, navigate to where you want the installer script to be saved. In the above command, we’ve specified to save the installer as anaconda.sh, but you can use any preferred name.

The installer script is large and will take some time, depending on your network’s performance. Once the download is completed, verify the file is available using the ls command. Another crucial thing is to check the integrity of the installer script.
To do so, we’ve used the SHA-256 checksum by running the below command.

$ sha256sum anaconda.sh

Once you get the output, confirm that it matches against the available Anaconda3 hashes from the website. Once everything checks out, you can proceed with the installation.

Step 2: Run the conda Installer Script
Anaconda has an installer script that will take you through installing it. To run the bash script, execute the below command.

$ bash anaconda.sh

The script will trigger different prompts that will walk you through the installation. For instance, you must press the Enter key to confirm that you are okay with the installation.
Next, a document containing the lengthy Anaconda license agreement will open.

Sponsored

Please go through it, and once you reach the bottom, type yes to confirm that you agree with the license terms.

You must also specify where you want the installation to be installed. By default, the script selects a location in your home directory, which is okay in some instances. However, if you prefer a different location, specify it and press the enter key again to proceed with the process.

Conda will start installing, and the process will take a few minutes. In the end, you will get prompted to initialize Anaconda3. If you wish to initialize it later, choose ‘no.’ Otherwise, type ‘yes,’ as in our case.

That’s it! You will get an output thanking you for installing Anaconda3. This message confirms that the conda utility was installed successfully on Ubuntu 24.04, and you now have the green light to start using it.

Step 3: Activate the Installation and Test Anaconda3
Start by sourcing the ~/.bashrc with the below command.

$ source ~/.bashrc

Next, restart your shell to open up in the Anaconda3 base environment.
You can now check the installed conda version.

$ conda version

Better yet, you can view all the available packages by listing them using the command below.

$ conda list

With that, you’ve installed Conda on Ubuntu 24.04. You can start working on your projects and maximize the power of Anaconda3 courtesy of its multiple packages.

Conclusion

Anaconda is installed by installing the conda command-line utility. To install conda, you must download its installer script, execute it, go through the installation prompts, and agree to the license terms. Once you complete the process, you can use Anaconda3 for your projects and leverage all the packages it offers.

Ubuntu Server Admin

Recent Posts

How to Install and Use Zig Programming Language on Ubuntu or Debian Linux

In this article, we will see how to install and use zig programming language on…

3 hours ago

Linux Sed Tutorial: Learn Text Editing with Syntax and Examples

This article was adapted from its original version on NixCraft. Sed is an acronym for…

9 hours ago

How to Fix VMware’s “Could not open /dev/vmmon” Error on Ubuntu

You’ve recently installed VMware Workstation on your Ubuntu system and encountered the frustrating “Could not…

16 hours ago

How to Fix Ubuntu 404 Errors While Fetching Dependencies

Have you ever found yourself staring at a terminal full of 404 errors while trying…

16 hours ago

How to Fix ‘Please Install All Available Updates’ Error When Upgrading Ubuntu 18.04 to 20.04 LTS

One particularly frustrating error that many users face when trying to upgrade from Ubuntu 18.04 …

16 hours ago

How to fix “Release is not valid yet” Error in Docker Containers

In the world of containerization, time synchronization issues can create unexpected roadblocks when working with…

16 hours ago