In this article, we will have explained the necessary steps to install and configure Anaconda Python on Ubuntu 18.04 LTS. Before continuing with this tutorial, make sure you are logged in as a user with sudo
privileges. All the commands in this tutorial should be run as a non-root user.
Anaconda is the most popular, free, and open-source distribution of Python and R Programming language. Anaconda is mainly designed for Data Science and Machine Learning and used for large-scale data processing, predictive analysis, and scientific computing. It offers over 1400 data packages in the free and paid form. It also ships with conda command-line utility.
Install Anaconda Python on Ubuntu
Step 1. First, before you start installing any package on your Ubuntu server, we always recommend making sure that all system packages are updated.
sudo apt update sudo apt install software-properties-common apt-transport-https wget sudo apt upgrade
Step 2. Install Anaconda on Ubuntu.
Now download the Latest Version of Anaconda, At the time this article was written, the latest version of Anaconda is 2020.02. Check the developer download page to view the newest version:
cd /tmp wget https://repo.anaconda.com/archive/Anaconda3-2020.02-Linux-x86_64.sh
Next, the checksum is a security tool used to verify the authenticity and integrity of a downloaded script:
sha256sum Anaconda3-2020.02-Linux-x86_64.sh
The output should be like:
2b9f088b2022edb474915d9f69a803d6449d5fdb4c303041f60ac4aefcc208bb Anaconda3-2020.02-Linux-x86_64.sh
Now start the anaconda installation script running the following command:
bash Anaconda3-2020.02-Linux-x86_64.sh
The installation will finish. After successful installation, the following will appear:
installation finished. Do you wish the installer to prepend the Anaconda3 install location to PATH in your /home/user/.bashrc ? [yes|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
Use the conda
command to test the installation:
$ conda info active environment : None user config file : /home/user/.condarc populated config files : conda version : 4.5.4 conda-build version : 3.10.5 python version : 3.7.0.final.0 base environment : /home/user/anaconda3 (writable) channel URLs : https://repo.anaconda.com/pkgs/main/linux-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/free/linux-64 https://repo.anaconda.com/pkgs/free/noarch https://repo.anaconda.com/pkgs/r/linux-64 https://repo.anaconda.com/pkgs/r/noarch https://repo.anaconda.com/pkgs/pro/linux-64 https://repo.anaconda.com/pkgs/pro/noarch package cache : /home/user/anaconda3/pkgs /home/user/.conda/pkgs envs directories : /home/user/anaconda3/envs /home/user/.conda/envs platform : linux-64 user-agent : conda/4.5.4 requests/2.18.4 CPython/3.6.5 Linux/4.15.0-22-generic ubuntu/18.04 glibc/2.27 UID:GID : 1000:1000 netrc file : None offline mode : False
That’s all you need to do to install Anaconda on Ubuntu 18.04. I hope you find this quick tip helpful. If you have questions or suggestions, feel free to leave a comment below.