How to Install Anaconda on Ubuntu 18.04

Anaconda is the most popular python data science and machine learning platform, used for large-scale data processing, predictive analytics and scientific computing. Anaconda distribution ships with more than 1,000 data packages, the conda command-line tool and with a desktop graphical user interface called Anaconda Navigator.

This tutorial will guide you through the steps of downloading and installing Anaconda Python Distribution on Ubuntu 18.04.

Installing Anaconda

At the time of the writing of this article the latest stable version of Anaconda is version 5.2. Before downloading the Anaconda installer script visit the Anaconda Downloads page and check if there is a new version of Anaconda for Python 3 available for download.

Follow the steps below to install Anaconda on Ubuntu 18.04:

Download the Anaconda Installation Script.

Change to the tmp directory and download the Anaconda installation script that you copied from the Anaconda website with wget or curl:

To start the Anaconda installation process run the installation script:

bash Anaconda3-5.2.0-Linux-x86_64.sh

You should see an output like the following:

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

Press ENTER to continue and then press ENTER to scroll through the license. Once you’re done reviewing the license, you’ll be asked to approve the license terms:

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

Type yes to accept the licence and you’ll be prompted to choose the installation location.

Anaconda3 will now be installed into this location:
/home/linuxize/anaconda3
- Press ENTER to confirm the location
- Press CTRL-C to abort the installation
- Or specify a different location below

The default location is fine for most users, press ENTER to confirm the location and installation process will continue.

The installation may take some time and once it is completed, the following output will be displayed:

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

If you want to use the conda command type yes press ENTER and you’ll be presented the following output:

Appending source /home/linuxize/anaconda3/bin/activate to /home/linuxize/.bashrc
A backup will be made to: /home/linuxize/.bashrc-anaconda3.bak
For this change to become active, you have to open a new terminal.
Thank you for installing Anaconda3!

The installer will also ask you whether you would like to download and install Visual Studio Code.

Anaconda is partnered with Microsoft! Microsoft VSCode is a streamlined
code editor with support for development operations like debugging, task
running and version control.
To install Visual Studio Code, you will need:
- Administrator Privileges
- Internet connectivity
Visual Studio Code License: https://code.visualstudio.com/license
Do you wish to proceed with the installation of Microsoft VSCode? [yes|no]

You can find more information about Visual Studio at the editor website. If you want to install Visual Studio Code type yes otherwise type no.

To activate the Anaconda installation load the new PATH environment variable which was added by the Anaconda installer into the current shell session with the following command:

source ~/.bashrc

Verify the Installation

You can verify your Anaconda installation using the conda command. For example to display information about current conda install type: