Anaconda is basically a package manager used mostly frequently in data science which manages scientific libraries and dependencies for the Python programming language. While Anaconda is typically used in machine learning and artificial intelligence applications, it also works as a stand-alone package manager.
Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to perform related Python packages Installation queries.
In this context, we shall look into the method to install Anaconda on CentOS 8.
Before proceeding with this Installation procedure, ensure that you are using a user account with sudo or root privileges.
Then follow the outlined steps given below.
1. Install Packages for Anaconda Navigator
Anaconda Navigator provides a simple graphical user interface for launching applications and managing packages in a conda environment. If you wish to use a GUI after installing Anaconda on your system, install the following packages. To do this, simply Run the command:
$ sudo dnf install libXcomposite libXcursor libXi libXtst libXrandr alsa-lib mesa-libEGL libXdamage mesa-libGL libXScrnSaver
2. Download Anaconda
Download the Anaconda installer from the official site using the terminal. At the time of writing this article, the current stable version of Anaconda is 2021.05. Run the following wget command to download the latest version of the anaconda installer:
$ wget -P /tmp https://repo.anaconda.com/archive/Anaconda3-2021.05-Linux-x86_64.sh
3. Check Download Integrity
Here, you can check the integrity of the anaconda installer. Run the following command to validate the script's integrity using the SHA-256 checksum:
$ sha256sum /tmp/Anaconda3-2021.05-Linux-x86_64.sh
Verify the output against the sha256 hash column value in the Anaconda with Python 3 page.
If everything is alright, you will notice that the two digits matches which means the installer we have downloaded is authentic.
4. Install Anaconda
i. To begin the installation of Anaconda on CentOS 8 execute the command:
$ bash /tmp/Anaconda3-2020.02-Linux-x86_64.sh
You will be prompted to review the license agreement to proceed with the installation process. Press enter.
ii. Following that, you will be asked to agree to license terms. Scroll down to review the license agreement. Then, type yes to agree to the license terms and conditions.
iii. Next, you'll be required to select the installation location. To use the default installation directory press Enter to proceed.
Once the installation process is done, you will be prompted to run the conda init command to initialize Anaconda. This modifies the PATH environment variable, allowing Anaconda to run from any directory on your computer. To proceed, type yes.
iv. Finally, activate the Anaconda installation by either closing and re-opening your current shell or loading the new PATH environment into the current shell with the below command:
$ source ~/ .bashrc
To verify if Anaconda is successfully installed on CentOS 8, simply Run the below command:
$ conda info
This command will show Information about Anaconda on the terminal. Anaconda is now successfully installed on CentOS 8. To open the navigator GUI page, run the command:
You can regularly update conda and all packages associated with it by running the below command:
$ conda update --all
If there are any available updates, a list of the packages to be updated will be displayed on the terminal.
Anaconda has a simple utility to remove the software from your system.
1. Install the removal software by entering the following:
$ conda install anaconda-clean
The system will prompt you to confirm. Type y then Enter to confirm.
2. Once the anaconda-clean software is installed, you can use it to remove Anaconda from your system completely:
$ anaconda-clean ––yes
The ––yes option confirms each deletion request. You can omit this option if you want to confirm file deletion manually.
This article covers how you install Anaconda on your CentOS system. In fact, Anaconda manages many pre installed packages and that packages are helpful for data science, Machine Learning and Artificial intelligence applications. Once installed on your system, you can now start building your machine learning projects.