Anaconda is a free and open-source package manager of the Python and R programming languages. Anaconda is used to develop software for data science, machine learning, big data processing, scientific computing, and predictive analytics. It is cross-platform and can be installed on several operating systems including Windows, Linux, and macOS. It is very popular among data science professionals as it allows them to install and manage Python dependencies in a single installation easily. It comes with a fantastic collection of scientific Python packages, tools, resources, and IDEs.

In this post, we will show you how to install Anaconda Python Distribution on Oracle Linux 8.

Step 1 – Download Anaconda Installer Script

First, visit the Anaconda official download page and download the latest version of the Anaconda Python installation script using the following command:


Once the Anaconda installer is downloaded, create the sha256 cryptographic hash of the installer file using the command below:


You will get the following output:


Next, compare the above result to the hashes available on the Anaconda website.

If the result matches, you can proceed to the next step.

Step 2 – Install Anaconda on Oracle Linux 8

Next, run the Anaconda installer script to install Anaconda on your system.


You will be asked to accept the License terms as shown below:

Welcome to Anaconda3 2022.05

In order to continue the installation process, please review the license
Please, press ENTER to continue
Do you accept the license terms? [yes|no]
[no] >>> yes

Type yes and hit Enter. You will be asked to set the installation location:

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

[/root/anaconda3] >>> 

Press Enter to proceed with the default location. You will be asked to init Anaconda:

installation finished.
Do you wish the installer to initialize Anaconda3
by running conda init? [yes|no]
[no] >>> yes

Type yes and hit Enter to init Anaconda and finish the installation:

==> For changes to take effect, close and re-open your current shell. <==

If you'd prefer that conda's base environment not be activated on startup, 
   set the auto_activate_base parameter to false: 

conda config --set auto_activate_base false

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:

Now, activate the Anaconda installation using the following command:

source ~/.bashrc

You will get the Anaconda shell in the following output:

(base) [root@oraclelinux8 ~]# 

Step 3 – Verify Anaconda Installation

After the successful installation, you can verify the Anaconda installation using the following command:

conda info

You will get the following output:

      active environment : base
    active env location : /root/anaconda3
            shell level : 1
       user config file : /root/.condarc
 populated config files : 
          conda version : 4.12.0
    conda-build version : 3.21.8
         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/4.12.0 requests/2.27.1 CPython/3.9.12 Linux/4.18.0-348.12.2.el8_5.x86_64 ol/8.5 glibc/2.28
                UID:GID : 0:0
             netrc file : None
           offline mode : False

You can see a list of all packages available in Anaconda using the following command:

conda list

You should see all packages in the following output:

# packages in environment at /root/anaconda3:
# Name                    Version                   Build  Channel
_ipyw_jlab_nb_ext_conf    0.1.0            py39h06a4308_1  
_libgcc_mutex             0.1                        main  
_openmp_mutex             4.5                       1_gnu  
aiohttp                   3.8.1            py39h7f8727e_1  
aiosignal                 1.2.0              pyhd3eb1b0_0  
alabaster                 0.7.12             pyhd3eb1b0_0  
anaconda                  2022.05                  py39_0  
anaconda-client           1.9.0            py39h06a4308_0  
anaconda-navigator        2.1.4            py39h06a4308_0  

Step 4 – Update Anaconda

Anaconda provides a conda utility to update the Anaconda package. First, run the following command to update the conda utility to the latest version.

conda update conda

You will get the following output:

The following packages will be downloaded:

    package                    |            build
    conda-4.13.0               |   py39h06a4308_0         895 KB
                                           Total:         895 KB

The following packages will be UPDATED:

  conda                               4.12.0-py39h06a4308_0 --> 4.13.0-py39h06a4308_0

Proceed ([y]/n)? y

Next, update Anaconda with the following command:

conda update anaconda

Step 5 – Create an Environment Using Anaconda

Anaconda provides an easier way to create an environment to organize projects based on Python versions.

To create a new environment named conda_env, run the following command:

conda create --name conda_env python=3

After creating an environment, activate the environment using the following command:

conda activate conda_env

You will get the following shell:

(conda_env) [root@oraclelinux8 ~]# 

Next, verify the Python version using the following command:

python --version

You will get the following output:

Python 3.10.4

To list all your environments, run the following command:

conda info --envs

You should see the following output:

# conda environments:
base                     /root/anaconda3
conda_env             *  /root/anaconda3/envs/conda_env

To deactivate from the Anaconda environment, run the following command:

conda deactivate

To remove the conda_env, run the following command:

conda env remove -n conda_env

Sample output:

Remove all packages in environment /root/anaconda3/envs/conda_env:

Step 6 – Uninstall Anaconda

To uninstall Anaconda from your system, you will need to install the anaconda-clean utility on your system. You can install it using the following command:

conda install anaconda-clean

Once installed, you will get the following output:

## Package Plan ##

  environment location: /root/anaconda3

  added / updated specs:
    - anaconda-clean

The following packages will be downloaded:

    package                    |            build
    anaconda-clean-1.1.1       |   py39h06a4308_0           8 KB
                                           Total:           8 KB

The following NEW packages will be INSTALLED:

  anaconda-clean     pkgs/main/linux-64::anaconda-clean-1.1.1-py39h06a4308_0

Proceed ([y]/n)? y

Next, run the following command to uninstall Anaconda from your system.


You will get the following output:

Delete .conda? (y/n): y
Backup directory: /root/.anaconda_backup/2022-06-22T114720

Next, remove all files and directories created by Anaconda using the following command:

rm -rf ~/.condarc ~/.conda ~/.continuum

Next, edit the .bashrc file and remove all lines added by Anaconda:

nano ~/.bashrc

Remove the following lines:

# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/root/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
    eval "$__conda_setup"
    if [ -f "/root/anaconda3/etc/profile.d/" ]; then
        . "/root/anaconda3/etc/profile.d/"
        export PATH="/root/anaconda3/bin:$PATH"
unset __conda_setup
# <<< conda initialize <<<

Save and close the file when you are finished.


In this post, we learned how to install Anaconda on Oracle Linux 8. You also learned how to manage Python using the Anaconda For more information, visit the Anaconda documentation page. Try it on dedicated hosting from Atlantic.Net!