Anaconda is an Open-Source distribution for Python & R programming languages. It is being used widely for Machine Learning, Data Science, etc. It has more than 1500 python/R data packages & is an industry-standard for developing, testing, and training on a single machine.

With anaconda’s conda, we can manage dependencies, libraries & environments. We can also use it with a number of applications like TensorFlow, Dask, Numba, Boken, Datashader, etc to develop and train machine learning and deep learning models or analyze data with scalability and performance or to visualize results.

Recommended Read: How to install PIP on Ubuntu- Python Package Manager

Also Read: Introduction to Bash Scripting Tutorial

In this tutorial, we will learn to install Anaconda on Ubuntu. Let’s start out with pre-requisites first.

Pre-requisites

Before we can install Anaconda on Ubuntu, we need to make sure that the following packages are installed or not,

# yum install libXcomposite libXcursor libXi libXtst libXrandr alsa-lib mesa-libEGL libXdamage mesa-libGL libXScrnSaver

You must also ensure that Python is installed on your system, which in most cases it’s installed. You can also refer to this detailed tutorial on installing Python on CentOS or installing Python from the source.

After installing these packages, we can move to the installation part.


Install Anaconda

For anaconda installation, we need to download the latest installation script available on the following URL. You can also use the following command to download the script on your system,

# wget https://repo.anaconda.com/archive/Anaconda3-2019.10-Linux-x86_64.sh

This script is for python 3.7, so make sure that you have that installed. There is also an installation script for python 2.7 but I recommend not to use that since Python 2.7 is no longer being supported but you can use that also if you want.

The script is about 500 Mb in size & will take some to complete. Once the script has been downloaded, we need to run the script to install anaconda on Ubunutu,

# bash Anaconda3-2019.10-Linux-x86_64.sh

Now follow the on-screen instructions to install anaconda, basically, we need to press ‘enter’ only till the script completes.

In the end, you will be asked questions like “License Agreement”, “Installation Path ”, “Installer adding PATH variable for anaconda on .bashrc fie”. You need to provide input for all these, upon completion of these questions, Anaconda will be installed on the system.

Now we can either log out & log back in or use the following command to activate the installation,

# source ~/.bashrc

Now either we can use a GUI tool called Anaconda Navigator to use conda or we can also use the cli commands for conda to manage the packages. We can start anaconda navigator from the menu or by entering the following command in the terminal,

# anaconda-navigator

Let’s also discuss some CLI commands for Conda.


Conda Commands

Install a package

To install a package using conda, the command is

$ conda install package_name

Update a package

To update a package, use

$ conda update package_name

Remove a package

To remove a package name, use

$ conda remove package_name

You can also refer to a detailed cheat sheet for Condo Commands. This concludes our tutorial for Anaconda installation on CentOS. Please do send us your queries, suggestions using the comment box below.

If you think we have helped you or just want to support us, please consider these:-

Connect to us: Facebook | Twitter | Linkedin

TheLinuxGURUS are thankful for your continued support.