How to install Anaconda on Ubuntu 22.04

Endrit Qerreti

Endrit Qerreti

In this tutorial, you will learn how to install Anaconda on Ubuntu 22.04.

Anaconda is a Python distribution for data science. Anaconda comes with conda package manager that allows you to install and manage over 7.5K open source packages on your system.

Step 1 - Download Anaconda

Anaconda can be installed on Ubuntu 22.04 by downloading the Anaconda setup. To download Anaconda setup, you can use a tool like wget or curl. In this tutorial, we'll be downloading Anaconda setup file via curl.

curl -o https://repo.anaconda.com/archive/Anaconda3-2023.09-0-Linux-x86_64.sh

If you have curl installed on your Ubuntu 22.04 machine, run the command below to download Anaconda setup file

curl -o https://repo.anaconda.com/archive/Anaconda3-2023.09-0-Linux-x86_64.sh

If you don't have curl installed on your machine, you can easily install it via the command below

sudo apt install curl

Step 2 - Install Anaconda

Once you have downloaded Anaconda setup, you can now install it. To install Anaconda, first you need to change the directory to /tmp

cd /tmp

Next, execute the setup file to begin installing Anaconda

bash Anaconda3-2023.09-0-Linux-x86_64.sh

Once you execute the setup file, you will be asked whether you want to accept Anaconda License Terms, to proceed installing Anaconda and accept its terms you need to press enter on this step

Next, you need to press enter to read the license terms

As you press enter, at the end of the license terms, you will be asked whether you want to accept this license agreement or not. Now simply type 'yes' and continue installing Anaconda

Once you confirm the license agreement, now you need to choose the location where you want to install Anaconda.

If you want to leave the path as is, meaning to use the default path /home/owlhowto/anaconda3/ simply press enter on this step

If you want to use another path to install Anaconda, then simply specify the path and press enter

Once Anaconda is installed on your system, you will see the following output on your terminal.

Next, you need to run the command below to add conda on your current shell

source ~/.bashrc

You should be able to use conda now. To use conda, simply call conda on your terminal

conda

Conclusion

In this tutorial, you learned how to install Anaconda on Ubuntu 22.04.