How to install Anaconda in Ubuntu 18.04

Table of Contents

How to install Anaconda in Ubuntu 18.04

Anaconda is a free and open-source distribution of the Python and R programming languages for scientific computing (data science, machine learning applications, large-scale data processing, predictive analytics, etc.), that aims to simplify package management and deployment. The distribution includes data-science packages suitable for Windows, Linux, and macOS. It is developed and maintained by Anaconda, Inc., which was founded by Peter Wang and Travis Oliphant in 2012. As an Anaconda, Inc. product, it is also known as Anaconda Distribution or Anaconda Individual Edition, while other products from the company are Anaconda Team Edition and Anaconda Enterprise Edition, both of which are not free.

In this tutorial will teach you how to install Anaconda on an Ubuntu 18.04 server.

Step 1 — Download the Latest Version of Anaconda


From a web browser, go to the Anaconda Distribution page, available via the following link:

Find the latest Linux version and copy the installer bash script.

Step 2 — Download the Anaconda Bash Script


Logged into your Ubuntu 18.04 server as a sudo non-root user, move into the /tmp directory and use curl to download the link you copied from the Anaconda website:

cd /tmp
curl -O

Step 3 — Verify the Data Integrity of the Installer


Ensure the integrity of the installer with cryptographic hash verification through SHA-256 checksum:


Step 4 — Run the Anaconda Script


You’ll receive the following output to review the license agreement by pressing ENTER until you reach the end.


Welcome to Anaconda3 2020.07

In order to continue the installation process, please review the license
Please, press ENTER to continue
Do you approve the license terms? [yes|no]

When you get to the end of the license, type yes as long as you agree to the license to complete the installation.

Step 5 — Complete Installation Process


Once you agree to the license, you will be prompted to choose the location of the installation. You can press ENTER to accept the default location, or specify a different location.

Anaconda3 will now be installed into this location:

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

[/home/user/anaconda3] >>>

At this point, the installation will proceed. Note that the installation process takes some time.

Step 6 — Select Options


Once the installation is complete, you’ll receive the following output:

installation finished.
Do you wish the installer to prepend the Anaconda3 install location
to PATH in your /home/user/.bashrc ? [yes|no]
[no] >>>

It is recommended that you type yes to use the conda command.

Step 7 — Activate Installation


You can now activate the installation with the following command:

source ~/.bashrc

Step 8 — Test Installation


Use the conda command to test the installation and activation:

conda list

You’ll receive the output of all the packages you have available through the Anaconda installation.

Step 9 — Set Up Anaconda Environments


You can create Anaconda environments with the conda create command. For example, a Python 3 environment named my_env can be created with the following command:

conda create --name my_env python=3

Activate the new environment like so:

conda activate my_env

Your command prompt prefix will change to reflect that you are in an active Anaconda environment, and you are now ready to begin work on a project

Tips and tricks

In this tutorial, you have successfully learned how to install Anaconda in Ubuntu 18.04. f you want to learn more about Anaconda checkout these documentations:

If you want a server with Ubuntu 18.04 operating system, get started now with VPSie and get one month for free.

This tutorial is to help you based on this original tutorial please use our tutorial for notes and tips.

Share on