It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In RegisterIt looks like you're new here. If you want to get involved, click one of these buttons!
Anaconda is a popular data science and machine learning platform. It supports Python and R programming languages. It is used for large-scale data processing, predictive analytics, and scientific computing.
In this guide we will show how to install Anaconda on AlmaLinux 9 and Rocky Linux 9.
First, update your package list to ensure all software is up to date:
dnf update -y
Use wget to download the latest Anaconda installer from the official website (in our case, the latest version is Anaconda3-2024.10-1):
dnf install wget
wget https://repo.anaconda.com/archive/Anaconda3-2024.10-1-Linux-x86_64.sh
To make the script executable:
chmod +x Anaconda3-2024.10-1-Linux-x86_64.sh
Start the installer script:
./Anaconda3-2024.10-1-Linux-x86_64.sh
Press Enter to view the license.
Use the Space to scroll through.
Type yes to accept the license.
Then, press Enter to install in the default location (~/anaconda3) or provide a custom path.
You will also be asked if you wish to update your shell profile to automatically initialize conda. You can just press enter (which means "no" by default") and continue.
After installation completes:
source ~/anaconda3/bin/activate
Verify that Conda is working:
conda --version
Run this to set up automatic Conda activation in your shell:
conda init
Then reboot your system:
reboot
Make sure Conda itself is up to date:
conda update -n base -c defaults conda
Create a test environment with Python 3.9:
conda create -n test_env python=3.9
Activate it:
conda activate test_env
Check the Python version:
python --version
If you're inside an environment like test_env and want to deactivate it:
conda deactivate
This will return you to the base environment.
To exit from the base environment, run the same command again.
You're all set! Now you can install packages, manage environments, and use Conda effectively.