How to Install Anaconda in Linux, Windows, and Mac

Being a machine learning engineer or data scientist, you might know how essential it is to have a reliable and robust data science environment.

Anaconda is a popular open-source distribution that offers an extensive data science environment that also comprises essential tools for machine learning, data analysis, and more.

Today’s blog will discuss the process of installing Anaconda on Linux, Windows, and Mac, so you can get started with data science and machine learning easily and quickly!

How to Install Anaconda on Linux

Before heading towards the Anaconda installation on Linux, make sure that your system fulfills the enlisted requirements.

Prerequisites for Linux

Before we get started, here are the system requirements for Anaconda:

  • A 64-bit operating system.
  • Your system should have at least 5 GB of free disk space.
  • Konsole or GNOME terminal application for running commands.
  • A curl or wget for downloading Anaconda.

Lastly, verify if Python has been installed on your system by pressing CTRL+ALT+T to open the terminal and run the provided command:

$ python3
Check Python in Linux
Check Python in Linux

Download Anaconda for Linux

For the purpose of downloading the Anaconda installer on Linux, navigate to the Anaconda official website and select the installer for Linux.

Alternatively, you can use the following curl or wget a command-line tool to download the Anaconda Installer directly on the terminal.

$ wget https://repo.anaconda.com/archive/Anaconda3-2023.03-1-Linux-x86_64.sh
OR
$ curl -O https://repo.anaconda.com/archive/Anaconda3-2023.03-1-Linux-x86_64.sh

After downloading the installer file, list out the directory content, which will show the Anaconda bash script file.

$ ls

Anaconda3-2023.03-1-Linux-x86_64.sh

Install Anaconda on Linux

Now, run the following command to start the Anaconda installation.

$ bash Anaconda3-2023.03-1-Linux-x86_64.sh

During the installation, you will be asked to accept the license agreement, select the installation location and add Anaconda to the PATH environment. Fulfill these requirements one by one.

Install Anaconda in Linux
Install Anaconda on Linux

It can be seen that Anaconda has been successfully installed on Linux.

Now source the “.bashrc” file for loading the new PATH environment variable into the terminal.

$ source .bashrc

Then, end the terminal and open a new terminal session. As you can see, the default Anaconda environment named base has been activated.

(bash) author@geeksveda:~$

Configure Anaconda on Linux

In case, if you have missed the step of adding the Anaconda installation location to the PATH, run this command.

$ conda init
Configure Anaconda in Linux
Configure Anaconda in Linux

Now, Anaconda is all ready to utilize on your Linux system.

How to Install Anaconda on Windows

This section will provide the steps regarding the Anaconda installation on the Windows system.

Prerequisites for Windows

Here is the list of prerequisites for your Windows system should fulfill:

  • A 64-bit OS.
  • The system should have at least 5GB of free space.
  • Administrative privileges for Anaconda installation.

Install Anaconda on Windows

Navigate to Anaconda’s official website, look for the Windows installer, and right-click on it to download the file.

After that, run the downloaded Anaconda installer as an administrator to start the setup wizard as shown.

Install Anaconda in Windows
Install Anaconda in Windows

Follow the on-screen installation instructions, and wait for a few more minutes until the installation gets completed.

Finish Anaconda Installation in Windows
Finish Anaconda Installation in Windows

For the purpose of launching Anaconda Navigator on Windows, open the Start menu and search for it.

Running Anaconda Navigator on Windows
Running Anaconda Navigator on Windows

How to Install Anaconda on Mac

For installing Anaconda on Mac, check out the given prerequisites.

Prerequisites for Mac

  • A 64-bit OS
  • A system having at least 5 GB free disk space.
  • Administrative privileges for installing Anaconda.

Install Anaconda on Mac

Download the Anaconda installer for Mac by visiting the official website of Anaconda.

The procedure to install Anaconda on Mac is quite similar to what we have explained for Windows. All you have to do is run the downloaded installer file, select the installation location, and lastly set Anaconda to the PATH environment variable.

After installing conda, run the provided command for configuring Anaconda.

conda init

As a result, you will be able to easily access Anaconda commands on Mac.

Note: In case you encounter any error during Anaconda installation, check out the Anaconda official documentation for troubleshooting tips and tricks.

Uninstalling Anaconda Distribution

In case, if you don’t want to use Anaconda, then uninstall it from your system by following the given instructions.

Uninstalling Anaconda from Linux and macOS

Open your terminal application and run the following commands to uninstall Anaconda with all traces of the configuration files and directories.

 
# conda install anaconda-clean
# anaconda-clean
# anaconda-clean --yes
# rm -rf anaconda3
# rm -rf ~/anaconda3
# rm -rf ~/opt/anaconda3

Uninstalling Anaconda from Windows

Open your Prompt and run the following commands to uninstall Anaconda with all traces of the configuration files and directories.

 
# conda install anaconda-clean
# anaconda-clean
# anaconda-clean --yes

Next, open the file explorer and delete your environment (anaconda3\envs) and package (anaconda3\pkgs) folders in your user folder.

Delete Ananconda from Windows
Delete Ananconda from Windows

For uninstalling Anaconda from your Windows system, open up the Control Panel and navigate to Uninstall a program section. After doing so, look for Anaconda, right-click on it, and select the Uninstall button.

Uninstall Anaconda from Windows
Uninstall Anaconda from Windows
Conclusion

Anyone involved in data science and machine learning needs to install and use Anaconda on their system. Because of its extensive tool sets and easy installation, you can utilize this tool for the management of the data science environment.

More specifically, by following the instructions given in this tutorial, you can quickly and easily install Anaconda on Linux, Windows, or Mac and then start using it for your data science projects.

If you read this far, tweet to the author to show them you care. Tweet a thanks
As a professional content writer with 3 years of experience, I specialize in creating high-quality, SEO-optimized content that engages, attracts, and retains the audience.

Each tutorial at GeeksVeda is created by a team of experienced writers so that it meets our high-quality standards.

Join the GeeksVeda Weekly Newsletter (More Than 5,467 Programmers Have Subscribed)
Was this article helpful? Please add a comment to show your appreciation and support.

Got Something to Say? Join the Discussion...