Home Python How to Install Anaconda in Linux

How to Install Anaconda in Linux

Anaconda is a popular tool among data analysts/scientists and machine learning engineers. Why is it so popular? If you are working as a data scientist or machine learning engineer you will be working with Python.

Python is a battery-included language so when you install python it will have a set of packages available to be used. These are basic packages and you will need a lot more packages when you work for data science like numpy, pandas, etc.

Anaconda is mainly created for scientific workloads. Tons of packages come with anaconda so you no need to install and maintain the environment manually. Along with packages, anaconda also has its own package manager called conda through which you can install, remove and update packages. Anaconda also comes with development tools like Spyder, Jupyter Notebook, Pycharm, IBM Watson, R studio, etc.

Anaconda comes with a free and commercial version. You can look at the official page to know more about it.

Install Anaconda in Linux

To use graphical packages with Linux, you need to install extended dependencies for Qt.

Debian apt-get install libgl1-mesa-glx libegl1-mesa libxrandr2 libxrandr2 libxss1 libxcursor1 libxcomposite1 libasound2 libxi6 libxtst6
RedHat yum install libXcomposite libXcursor libXi libXtst libXrandr alsa-lib mesa-libEGL libXdamage mesa-libGL libXScrnSaver
ArchLinux pacman -Sy libxau libxi libxss libxtst libxcursor libxcomposite libxdamage libxfixes libxrandr libxrender mesa-libgl alsa-lib libglvnd
OpenSuse/SLES zypper install libXcomposite1 libXi6 libXext6 libXau6 libX11-6 libXrandr2 libXrender1 libXss1 libXtst6 libXdamage1 libXcursor1 libxcb1 libasound2 libX11-xcb1 Mesa-libGL1 Mesa-libEGL1
Gentoo emerge x11-libs/libXau x11-libs/libxcb x11-libs/libX11 x11-libs/libXext x11-libs/libXfixes x11-libs/libXrender x11-libs/libXi x11-libs/libXcomposite x11-libs/libXrandr x11-libs/libXcursor x11-libs/libXdamage x11-libs/libXScrnSaver x11-libs/libXtst media-libs/alsa-lib media-libs/mesa

Now go to the Anaconda downloads page and grab the anaconda individual edition for Linux which is nothing but an installer file.

Once downloaded, you can verify the data integrity with the sha256sum command.

$ sha256sum Anaconda3-2021.05-Linux-x86_64.sh 
Check File Data Integrity
Check File Data Integrity

Now run the downloaded .sh file to install anaconda. As a first step, it will ask you to read the license agreement once you press enter.

$ bash Anaconda3-2021.05-Linux-x86_64.sh
Anaconda License Agreement
Anaconda License Agreement

In the next step, it will ask you to choose a location where the anaconda will be installed. It defaults to your home directory.

Anaconda Installation Directory
Anaconda Installation Directory

Packages will be installed and once the installation is completed it will ask to initialize Anaconda3 by running conda init. It defaults to No. You can choose Yes or No depending upon how you need it.

Anaconda Installation Completed
Anaconda Installation Completed

Go to the directory where anaconda is installed and under the bin directory, there is a binary called “anaconda-navigator”. This will launch the GUI program for anaconda from where you can launch your tools.

$ /home/karthick/anaconda3/bin/anaconda-navigator &
Anaconda Navigator
Anaconda Navigator

From the above image, you can see the installation is successful and there are a lot of tools like Jupyterlab, Hub, Spyder, IBM Watson studio, etc. that come preinstalled and you can launch it by clicking the “launch” icon.

That’s it for this article. We would love to hear your feedback.

Ravi Saive
I am an Experienced GNU/Linux expert and a full-stack software developer with over a decade in the field of Linux and Open Source technologies. Founder of TecMint.com, LinuxShellTips.com, and Fossmint.com. Over 150+ million people visited my websites.

Each tutorial at UbuntuMint is created by a team of experienced writers so that it meets our high-quality standards.

Was this article helpful? Please add a comment to show your appreciation and support.

3 thoughts on “How to Install Anaconda in Linux”

  1. Hi,

    Should I have installed in home/user rather than root then?

    ~/anaconda3/bin# anaconda-navigator
    2022-08-06 22:55:20,366 – WARNING linux_scaling.get_scaling_factor_using_dbus:32
    An exception occurred during the fetching the list of system display settings.

    QStandardPaths: wrong ownership on runtime directory /run/user/1000, 1000 instead of 0

    Reply

Got something to say? Join the discussion.

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published or shared. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.