How to Install and Set Up Anaconda on Ubuntu
Anaconda is an open-source distribution of Python and R programming languages that is widely used for data science, machine learning, and scientific computing. It provides an easy-to-use and comprehensive platform for data analytics and scientific research. Anaconda comes with a large collection of pre-installed packages, including popular libraries such as NumPy, Pandas, Matplotlib, and SciPy.
In this article, we will guide you on how to install and set up Anaconda on Ubuntu.
Step 1: Download Anaconda
The first step is to download the Anaconda distribution for Ubuntu. Go to the Anaconda website and choose the appropriate version of Anaconda for your system. For Ubuntu 18.04 or later, you can download the latest version of Anaconda from the following link:
https://www.anaconda.com/products/individual#Downloads
Step 2: Install Anaconda
Once you have downloaded the Anaconda installer, you can install it using the following steps:
1. Open the Terminal application in Ubuntu.
2. Navigate to the directory where the Anaconda installer is located.
3. Change the permission of the installer file to make it executable using the following command:
chmod +x Anaconda3-2020.02-Linux-x86_64.sh
4. Run the installer using the following command:
./Anaconda3-2020.02-Linux-x86_64.sh
5. Follow the on-screen instructions to complete the installation process. When prompted, press Enter to accept the license agreement, and then specify the location where you want to install Anaconda (the default location is /home/username/anaconda3).
6. After the installation is complete, you need to activate the Anaconda environment by running the following command:
source ~/.bashrc
Step 3: Test the Installation
To test if Anaconda is properly installed, you can open the Anaconda Navigator by typing the following command in the Terminal:
anaconda-navigator
This will open the Anaconda Navigator GUI interface, where you can explore the available packages and tools.
Alternatively, you can also test if the installation is successful by creating a new Python environment and running a simple Python program. Here are the steps:
1. Open the Terminal application in Ubuntu.
2. Create a new Python environment using the following command:
conda create –name testenv python=3.8
3. Activate the testenv environment using the following command:
conda activate testenv
4. Create a new Python file using the following command:
nano test.py
5. Enter the following code in the test.py file:
print(“Hello, Anaconda!”)
6. Save the file by pressing Ctrl+X, then Y, and then Enter.
7. Run the Python program using the following command:
python test.py
This should print the message “Hello, Anaconda!” in the Terminal.
Conclusion
In this article, we have shown you how to install and set up Anaconda on Ubuntu. Anaconda provides a powerful and comprehensive platform for data science, machine learning, and scientific computing, and is widely used by data scientists and researchers worldwide. By following the above steps, you can easily install and set up Anaconda on your Ubuntu system and start exploring the wonderful world of data analytics and scientific research.