How to Install Anaconda on CentOS 7?

Anaconda is a free and open-source distribution of Python programming language widely used in data science, machine learning, and artificial intelligence. It comes with a package manager and pre-installed libraries that make it easy for developers to start working on data science projects without worrying about installing dependencies. This article explains how to install Anaconda on CentOS 7.

Prerequisites

Before installing Anaconda, ensure you have the following requirements

  • A CentOS 7 server with root access

  • A stable internet connection

  • At least 4 GB of RAM

  • At least 10 GB of free disk space

Step 1 Update System

First, update your CentOS 7 system to ensure all packages are up-to-date

sudo yum update -y
sudo yum upgrade -y

Step 2 Download Anaconda

Download the latest Anaconda installation script. Check the official Anaconda website for the most recent version

wget https://repo.anaconda.com/archive/Anaconda3-2023.09-0-Linux-x86_64.sh

Step 3 Verify Data Integrity

Verify the installation script's integrity by comparing its SHA-256 checksum with the one provided on the Anaconda website

sha256sum Anaconda3-2023.09-0-Linux-x86_64.sh

Compare the first 8 characters of the output with the SHA-256 checksum from the official website to ensure the file is valid.

Step 4 Run Installation Script

Execute the Anaconda installation script

bash Anaconda3-2023.09-0-Linux-x86_64.sh

During installation:

  • Review and accept the license agreement by typing yes

  • Choose the installation location (default recommended)

  • When prompted to add Anaconda to your PATH, type yes for automatic configuration

Step 5 Reload Shell Configuration

After installation, reload your shell configuration to make conda available

source ~/.bashrc

Step 6 Verify Installation

Confirm the installation was successful by checking the conda version

conda --version
conda 23.7.4

Environment Management

Creating a New Environment

Create a new conda environment with a specific Python version

conda create --name myproject python=3.9

Activating and Using the Environment

Activate your new environment

conda activate myproject

Install packages in the active environment

conda install numpy pandas matplotlib

Deactivating the Environment

Return to the base environment when finished

conda deactivate

Essential Anaconda Commands

Command Description
conda update conda Update conda itself
conda list List installed packages
conda env list List all environments
conda remove package_name Remove a package
jupyter notebook Launch Jupyter Notebook

Post-Installation Tips

  • Export Environment Save your environment configuration to a YAML file for easy reproduction

conda env export > environment.yaml
  • Add Conda-Forge Channel Access additional packages from the community-maintained conda-forge channel

conda config --add channels conda-forge
  • Launch Anaconda Navigator Use the graphical interface for package and environment management

anaconda-navigator

Conclusion

Anaconda installation on CentOS 7 provides a complete Python data science environment with package management capabilities. The conda package manager makes it easy to create isolated environments, install packages, and manage dependencies for different projects.

Updated on: 2026-03-17T09:01:38+05:30

9K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements