Jun 22, 2023 5 min read

How to Install Anaconda on Ubuntu 20.04

Install Anaconda on Ubuntu 20.04 with our step-by-step tutorial. It is a powerful distribution platform for Python and R programming languages.

Install Anaconda on Ubuntu 20.04
Table of Contents

Choose a different version or distribution

Introduction

Before we begin talking about how to install Anaconda on Ubuntu 20.04, let's briefly understand – What is Anaconda?

Anaconda is a powerful distribution platform for Python and R programming languages. It simplifies the installation and management of numerous libraries and tools needed for data science and machine learning tasks. Anaconda comes bundled with popular packages like NumPy, pandas, and scikit-learn, making it ideal for beginners and experts alike.

With its user-friendly interface, Anaconda empowers developers to efficiently create and execute code, analyze data, and build robust applications. It is widely used in industries such as finance, healthcare, and technology, contributing to faster and more accurate data-driven decision-making.

In this tutorial, we will explain how to install Anaconda on Ubuntu 20.04. We will also address a few FAQs on how to install Anaconda on Ubuntu 20.04.

Advantages of Anaconda

  1. Simplified Installation: Anaconda streamlines the process of installing and managing libraries and tools for Python and R programming languages.
  2. Extensive Package Collection: It offers a vast collection of pre-built packages, including popular ones like NumPy, pandas, and scikit-learn.
  3. Cross-Platform Compatibility: Anaconda works seamlessly on Windows, macOS, and Linux, allowing users to collaborate across different operating systems.
  4. User-Friendly Interface: With an intuitive interface, Anaconda makes it easy for developers to write, execute, and analyze code efficiently.
  5. Industry Adoption: Anaconda is widely adopted in various industries, such as finance, healthcare, and technology, enabling faster and more accurate data-driven decision-making.

Installing Anaconda

The most recent stable Anaconda version at the time this article was written was 2020.02. Visit the Downloads page and see whether there is a new version of Anaconda for Python 3 available for download before downloading the installer script.

Complete the following steps to install Anaconda on Ubuntu 20.04:

1) The GUI of Anaconda Navigator is built on QT. Install the following packages if you wish to utilize the GUI application when installing Anaconda on a desktop computer. Skip this step if not.

sudo apt install libgl1-mesa-glx libegl1-mesa libxrandr2 libxrandr2 libxss1 libxcursor1 libxcomposite1 libasound2 libxi6 libxtst6

2) Use wget to install Anaconda with the following link:

wget -P /tmp https://repo.anaconda.com/archive/Anaconda3-2020.02-Linux-x86_64.sh

3) Although this step is optional, it is advised to perform it to ensure the script's data integrity.

To see the script checksum, use the sha256sum command:

sha256sum /tmp/Anaconda3-2020.02-Linux-x86_64.sh

The result should seem as follows:

Output

2b9f088b2022edb474915d9f69a803d6449d5fdb4c303041f60ac4aefcc208bb  /tmp/Anaconda3-2020.02-Linux-x86_64.sh

Verify that the hash displayed by the aforementioned command corresponds to the version of Anaconda that is compatible with Python 3 on 64-bit Linux.

https://docs.anaconda.com/anaconda/install/hashes/Anaconda3-2020.02-Linux-x86_64.sh-hash/

4) Start the installation process by running the following script.

bash /tmp/Anaconda3-2020.02-Linux-x86_64.sh

You will get an output like below:

Output

Welcome to Anaconda3 2020.02

In order to continue the installation process, please review the license
agreement.
Please, press ENTER to continue
>>> 

To continue, press ENTER key. Use the ENTER key to navigate the license. You will be prompted to accept the license conditions after considering the license like this:

Output

Do you approve the license terms? [yes|no]

Type yes to accept the license, and you’ll be prompted to choose the installation location:

Output

Anaconda3 will now be installed into this location:
/home/vega/anaconda3

    - Press ENTER to confirm the location
    - Press CTRL-C to abort the installation
    - Or specify a different location below

For most users, the default location should be adequate. To confirm the location, hit ENTER.

The script will prompt you to perform conda init after the installation, which could take some time. Type yes.

Output

Installation finished.
Do you wish the installer to initialize Anaconda3
by running conda init? [yes|no]

Conda, a command-line utility, will now be added to your system's PATH.

Close and reopen your shell to activate the Anaconda installation, or enter the following command to add the new PATH environment variable to the current shell session:

source ~/.bashrc

In your terminal, type conda to check the installation.

I'm done now! On your Ubuntu computer, Anaconda has been successfully installed, and you can now use it.

Anaconda is successfully installed on your desktop system, type anaconda-navigator into your terminal to launch the Navigator GUI.

Updating Anaconda

The procedure of updating the Anaconda is rather simple. Activate your terminal and type:

conda update --all

If updates are available, conda will provide a list and ask you to confirm the update:

Output

The following packages will be UPDATED:

  anaconda-navigator                          1.9.12-py37_0 --> 1.9.12-py37_1
  conda                                        4.8.2-py37_0 --> 4.8.3-py37_0
  conda-package-han~                   1.6.0-py37h7b6447c_0 --> 1.6.1-py37h7b6447c_0


Proceed ([y]/n)? 

Regular Anaconda installation updates are a good idea.

Uninstalling Anaconda

Remove the Anaconda installation directory and all other files created during the installation if you wish to uninstall Anaconda from your Ubuntu system:

rm -rf ~/anaconda3 ~/.condarc ~/.conda ~/.continuum

Remove the Anaconda directory from the PATH environment variable by opening the ~/.bashrc file:

Output

# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/home/vega/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
    eval "$__conda_setup"
else
    if [ -f "/home/vega/anaconda3/etc/profile.d/conda.sh" ]; then
        . "/home/vega/anaconda3/etc/profile.d/conda.sh"
    else
        export PATH="/home/vega/anaconda3/bin:$PATH"
    fi
fi
unset __conda_setup
# <<< conda initialize <<<

FAQs to Install Anaconda on Ubuntu 20.04

Can I install Anaconda on Ubuntu 20.04 using a graphical installer?

Yes, Anaconda provides a graphical installer for Ubuntu 20.04. You can download the graphical installer from the official Anaconda website, double-click on it, and follow the installation wizard to complete the process.

How much disk space does Anaconda require on Ubuntu 20.04?

The disk space required for Anaconda installation on Ubuntu 20.04 depends on the version you choose. As of the latest version, it typically requires around 3 GB of disk space.

How can I update Anaconda on Ubuntu 20.04?

You can update Anaconda on Ubuntu 20.04 by opening a terminal and running the command conda update anaconda. This will update Anaconda and its associated packages to the latest available versions.

Can I install both Python 2 and Python 3 with Anaconda on Ubuntu 20.04?

Yes, Anaconda allows you to install and manage multiple Python versions. By default, it comes with the latest Python 3 version, but you can also create separate Python 2 environments using the conda create command.

Can I use Anaconda with other programming languages on Ubuntu 20.04?

Yes, Anaconda supports multiple programming languages, including R and Julia. You can create separate environments for different languages and easily switch between them using the conda activate command.

Does Anaconda come with a package manager on Ubuntu 20.04?

Yes, Anaconda comes with its own package manager called conda. It allows you to easily install, update, and manage packages within your Anaconda environments on Ubuntu 20.04.

Is it possible to install additional packages with Anaconda on Ubuntu 20.04?

Absolutely! Anaconda provides a vast collection of pre-built packages. You can install additional packages by running the command conda install <package_name> in your activated Anaconda environment on Ubuntu 20.04.

Conclusion

We have demonstrated for you how to set up Anaconda on Ubuntu 20.04. Check out the official Getting started with anaconda guide right away.

If you have any queries, please leave a comment below and we’ll be happy to respond to them.

Great! You’ve successfully signed up.
Welcome back! You've successfully signed in.
You've successfully subscribed to DevOps Tutorials - VegaStack.
Your link has expired.
Success! Check your email for magic link to sign-in.
Success! Your billing info has been updated.
Your billing was not updated.