How To Install the Anaconda Python Distribution on Ubuntu 16.04



In this article we will show you how to install Anaconda Python on an Ubuntu 16.04 server. Anaconda is a free and open source package manager for the Python and R programming languages, and it is mainly used for machine learning and data science related applications. Anaconda comes with more than 1000 open-source packages and it works on all major operating systems including Linux, Mac OS and Windows. Installing Anaconda on Ubuntu 16.04 is fairly easy and straight to the point task, and it shouldn’t take more then 10 minutes to install it. Let’s get started.

Install Anaconda

The recommended approach to install Anaconda on Ubuntu 16.04 is to download the install script, verify the script integrity and then run the script.

At the time of the writing of this article the latest version of Anaconda is 5.2.0. Before downloading the installation script you should check the Anaconda Download page for a new version.

Switch to the /tmp directory and download the latest Anaconda installation script with the following commands:

cd /tmp
curl -O

Once the script is downloaded, verify the file integrity the sha256sum command as shown bellow:


The output will look similar to bellow:


Now visit the Anaconda with Python 3 on 64-bit Linux page and verify the hash printed on your terminal against the hash shown on the page for the Anaconda version you have downloaded.

In our case we need to verify the 09f53738b0cd3bb96f5b1bac488e5528df9906be2480fe61df40e0e0d19e3d48 hash against the hash shown in the sha256 row on the Hashes for page. If the hashes match, you can continue with the Anacoda Python installation.

Start the Anaconda installation by running the script:


The script will print the following output:

Welcome to Anaconda3 5.2.0

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

Press ENTER to continue and then press ENTER to scroll through the license. Next, you will be asked to accept the license terms:

Do you accept the license terms? [yes|no]
[no] >>>
Please answer 'yes' or 'no':'

Type yes and hit ENTER and you will be prompted to accept the default Anaconda installation path:

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

To confirm the default location press ENTER and the Anaconda installation will start which may take some time depending on your server resources.

Next, the installer will ask you if you want to prepend the Anaconda install location to the PATH in your ~/.bashrc file. Again type yes and press ENTER:

Do you wish the installer to prepend the Anaconda3 install location
to PATH in your /home/rose/.bashrc ? [yes|no]
Appending source /home/rose/anaconda3/bin/activate to /home/rose/.bashrc
A backup will be made to: /home/rose/.bashrc-anaconda3.bak

For this change to become active, you have to open a new terminal.

Thank you for installing Anaconda3!


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:

Do you wish to proceed with the installation of Microsoft VSCode? [yes|no]

Once the Anaconda installation is completed, the installer will ask you if you want to install Microsoft VSCode. If you do not need the Microsoft VSCode code editor, type no and press ENTER.

To activate your Anaconda installation you will either need to open a new terminal or to source the ~/.bashrc file:

source ~/.bashrc

You can now verify your Anaconda installation by running the following command:

conda --version

The output below shows the conda version:

conda 4.5.4      

How to Upgrading Anaconda

You should regularly upgrade your Anaconda installation whenever a new version is available.

To upgrade Anaconda first you need to upgrade the conda tool with the following command:

conda update conda

This process may take some time and if there is a new update available you will be promoted to accept the update.

Once the conda utility is updated you can proceed with Anaconda update by running the following command:

conda update anaconda

Same as before you will be prompted to accept the update.

Congratulations. You have successfully installed Anaconda Python on Ubuntu 16.04. For the official documentation of Anaconda Python visit the official page, by clicking on this link.

Original Article