How to Install Anaconda on Ubuntu 22.04

In the ever-evolving world of technology, data analysis has become a crucial skill. Anaconda, a popular open-source distribution of Python and R, is widely used for data science and machine learning applications.

This comprehensive guide provides step-by-step instructions on how to install Anaconda on Ubuntu 22.04, a popular Linux distribution. Whether you’re a seasoned developer or a beginner stepping into the world of programming and data science, this guide will help you set up Anaconda on your Ubuntu system. Additionally, we also cover how to uninstall Anaconda should you ever need to. Let’s dive in and explore the process in detail.

Read: How to update Anaconda

Refresh System Repositories

Start by updating the system’s default repository to get the latest packages. You can do this by running the following command:

sudo apt update

sudo apt upgrade

Proceed to Install Curl Package

Curl is needed to fetch the Anaconda installation script. You can install Curl on Ubuntu 22.04 with this command:

sudo apt install curl

Read: Anaconda navigator not opening on Windows 10

Get Ready with Anaconda Installer

To download the Anaconda installer script, use the following command:

curl –output anaconda.sh https://repo.anaconda.com/archive/Anaconda2-2019.07-Linux-x86_64.sh

Ensure that you obtain the most recent version from their official website.

In our case and for quick installation and illustration purposes we selected a file with a lower size.

Next, compare the “SHA-256” checksum of the Anaconda script you’ve downloaded with the code that’s shown on the official website.

sha256sum anaconda.sh

Time to Install Anaconda in Ubuntu 22.04

Before installing Anaconda on Ubuntu 22.04, run the anaconda.sh script as follows:

bash anaconda.sh

After completing this step, the Anaconda installation wizard will show up in the terminal; hit the “Enter” key to proceed.

After reading the License Agreement of Anaconda, type out “yes” to move ahead.

Read: How to fix error : Conda command not found

Indicate the directory path in your Ubuntu 22.04 system where you wish to store the Anaconda installation files.

​​Please be patient for a while as the installation of Anaconda may take several minutes to finish.

Activate Your Environment Settings

As the bashrc script for Anaconda has already been initialized, you can execute the bashrc script to activate the Anaconda environment as follows:

source ~/.bashrc

Confirm Your Anaconda Installation

To verify that Anaconda has been installed successfully, get the version of Anaconda via the following command:

conda –version

Uninstalling Anaconda for Ubuntu 22.04

If you have installed Anaconda in Ubuntu 22.04 using the terminal, you can remove/uninstall it with the help of the following command:

rm -rf ~/anaconda2

The “rm -rf” command is used to remove/uninstall all files forcibly. This command will remove the anaconda2 directory from your home directory.

 


If you like the content, we would appreciate your support by buying us a coffee. Thank you so much for your visit and support.

 

Nikolaus Oosterhof

Nikolaus holds a degree in software development and has a strong passion for all things tech-related, especially gadgets with screens. Though he is nostalgic for older phone models, he's a retired gamer and continues to enjoy programming in open-source environments. Additionally, Nikolaus enjoys writing about Linux, macOS and Windows and has experience designing web pages.

Leave a Reply