Linux Applications Linux Commands

How To Install Anaconda on Linux

Anaconda is an open-source Python and R programming language distribution. It is powerful software for managing environments, packages, and other development tools like Jupyter Notebook and Spyder. Moreover, it comprises over 250 packages, making it easy to kickstart your development journey.

Anaconda’s features include package management, creating virtual environments, integrated development environment (IDE) support, and more. Its reproducibility function generates easy-to-share projects. This short guide provides brief information about installing Anaconda on Linux without any hassles.

How To Install Anaconda

First, download the Anaconda installer from the Anaconda’s official archive. Please ensure to download an appropriate version for your Linux architecture. Here are the commands you can follow:

sudo apt update

wget https://repo.anaconda.com/archive/Anaconda3-2024.02-1-Linux-x86_64.sh

anaconda-installation-using-wget-command

Although we use the wget command to download the installer, you can alternatively download it through Anaconda’s website. Once you have downloaded this installer script file, run it using the below command:

bash Anaconda3-2024.02-1.Linux-x86_64.sh

running-anaconda-file-in-linux

Now, follow the on-screen instructions, then it will ask you to confirm the installation path. Press Enter and keep it on the default path. However, you can also specify your desired location.

on-screen-instructions-for-installing-anaconda

Lastly, enter ‘yes’ to automatically activate Conda on system startup. You can change this anytime by running:

conda init --reverse $SHELL

installation-process-of-anaconda

Finally, the terminal will show, “Thank you for installing Anaconda3!”.

final-process-of-installing-anaconda

Before moving further, you need to activate and initialize the Anaconda3 through the following command: 

export PATH="</path of anaconda3/>bin:$PATH"

export-command-for-anaconda-in-linux

Make sure you change the above command from </path of anaconda3/> to the actual path of Anaconda3 according to your system. Verifying all new packages is a good practice to avoid unintentional system errors. So, Let’s now verify Anaconda’s installation by checking the version information:

conda --version

checking-the-installed-version-of-anaconda

It shows the version number correctly, so there’s no issue. Otherwise, you would have to reinstall it using the above steps.

How to Update Anaconda

If you anytime need to update Anaconda, run the below command:

conda update --all

updating-anaconda-in-linux

Difference Between Anaconda and Miniconda

Anaconda is a full-packed distribution with over 250 standard machine learning and data science packages. Miniconda is a minimal installer that consists of Conda, Python, and a few more packages, and it lets you install other packages according to your needs.

Anaconda distribution is best for beginners who are unaware of the packages they should use. Miniconda, on the other hand, is for users who know what packages they want to use.

A Quick Wrap-Up

Anaconda is powerful open-source software that can run machine learning projects, create virtual environments, distribute packages, and more. It lets you run your Python and R language programs smoothly. This article comprehensively demonstrates installing the Anaconda command line client on Linux. Moreover, we have also added a simple command to update Anaconda quickly. 

About the author

Prateek Jangid