How To Set up Anaconda on Rocky Linux 8

In this tutorial, we want to show you how to Set up Anaconda on Rocky Linux 8. Anaconda is an open-source distribution of the Python and R programming languages for data science that aims to simplify package management and deployment. Package versions in Anaconda are managed by the package management system, conda, which analyzes the current environment before executing an installation to avoid disrupting other frameworks and packages.

Steps To Set up Anaconda on Rocky Linux 8

To complete this guide, you must log in to your server as a non-root user with sudo privileges. To do this, you can follow our guide on Initial Server Setup with Rocky Linux 8.

Install Python 3 on Rocky Linux 8

To Set up Anaconda on Rocky Linux 8, you need to install Python 3 on your server.

First, update your local package index with the command below:

sudo dnf update -y

Then, use the command below to install Python 3:

sudo dnf install python3 -y

Verify your Python installation by checking its version:

python3 --version
Python 3.6.8

Install Anaconda on Rocky Linux 8

First, you need to visit the Anaconda Downloads Page, and from the Linux section, copy the link address of the Anaconda installer.

Anaconda installer
Anaconda Downloads Page

Download Anaconda Installer

Then, use the wget command to download the Anaconda installer on Rocky Linux 8.

The file should be saved to the Downloads directory. Or you can choose the other locations.

sudo wget -P ~/Downloads

At this point, switch to your Downloads directory:

cd ~/Downloads

Here you can verify Anaconda download integrity on Rocky Linux 8 with the command below:


In your output, you will see something similar to this:


You can compare this with the hashes on the Anaconda hashes web page. If the codes match, that means the software is authentic and ready to be used.

Install Anaconda

From your Downloads directory, run the command below to Set up Anaconda on Rocky Linux 8:

sudo bash

You will be asked to review the license agreement. Press Enter, then use Enter or the Spacebar to scroll through the agreement. In the end, type yes to agree to the license.

Also, you’ll be asked to confirm Anaconda’s installation directory. Use the default directory by pressing Enter.

Then, you will be asked to initialize Anaconda with conda init. Press yes and Enter.

When your installation is completed you will get the following output:

Thank you for installing Anaconda3!


Working with Python and Jupyter is a breeze in DataSpell. It is an IDE
designed for exploratory data analysis and ML. Get better data insights
with DataSpell.

DataSpell for Anaconda is available at:

Note: Do not install in the /usr directory. When the installation finishes, this time, you won’t be prompted to initialize Anaconda. Instead, enter the following commands:

source <anaconda_installation_location>/bin/activate
conda init

At this point, you need to reboot your server. After that, you can verify your Anaconda installation on Rocky Linux 8 with the following command:

conda info
active environment : base
    active env location : /root/anaconda3
            shell level : 1
       user config file : /root/.condarc
 populated config files :
          conda version : 22.9.0
    conda-build version : 3.22.0
         python version :
       virtual packages : __linux=4.18.0=0
       base environment : /root/anaconda3  (writable)
      conda av data dir : /root/anaconda3/etc/conda
  conda av metadata url : None
           channel URLs :
          package cache : /root/anaconda3/pkgs
       envs directories : /root/anaconda3/envs
               platform : linux-64
             user-agent : conda/22.9.0 requests/2.28.1 CPython/3.9.13 Linux/4.18.0-425.10.1.el8_7.x86_64 rocky/8.7 glibc/2.28
                UID:GID : 0:0
             netrc file : None
           offline mode : False

Load Python Shell

At this point, you can load the Python programming shell by using the command below:


Your command prompt will change to this:

Python 3.9.13 (main, Aug 25 2022, 23:26:10)
[GCC 11.2.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.

To exit from the Python shell, run the command below:


Update Anaconda on Rocky Linux 8

To update your Anaconda service, you need to first update the conda with the command below:

conda update conda

Conda is a package manager for the Anaconda Python environment. It’s always best to update your package manager before installing updates.

Then, use the following command to update Anaconda on Rocky Linux:

conda update anaconda

Uninstall Anaconda

If you want to remove Anaconda from your Rocky Linux 8, you need to install the removal software with the command below:

conda install anaconda-clean

When your installation is completed, you can uninstall Anaconda from your server with the command below:

anaconda-clean ––yes


At this point, you have learned to Set up Anaconda on Rocky Linux 8. You need to be sure that you have Python installed on your server, then, download the official installer and install your Anaconda.

Hope you enjoy it.

Also, you may be interested in these articles:

Install and Configure Apache Maven on Rocky Linux 8

Install GCC Compiler on Rocky Linux 8

Newsletter Updates

Enter your email address below and subscribe to our newsletter

Stay informed and not overwhelmed, subscribe now!