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
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.
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
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.
Follow the on-screen installation instructions, and wait for a few more minutes until the installation gets completed.
For the purpose of launching Anaconda Navigator on Windows, open the Start menu and search for it.
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.
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.
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.
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.