Install Anaconda on Ubuntu: Complete Guide
You can set up the Anaconda environment in Ubuntu by following these steps:
- To download Anaconda, first you need to download the appropriate Anaconda installation package for your system from the official Anaconda website, where you can choose between Python 3.x or Python 2.x versions.
- Install Anaconda: Open the terminal, go to the folder where the downloaded Anaconda installation package is located, and run the following command to install Anaconda:
bash Anaconda3-2021.05-Linux-x86_64.sh
During the installation process, you will be prompted to agree to the license agreement, choose the installation path, and follow the instructions to complete the installation.
- Setting up environment variables: Open the terminal, edit the .bashrc file, and add the path of Anaconda to the environment variables. You can use the following command to open the .bashrc file:
nano ~/.bashrc
Add the following content to the end of the file (assuming Anaconda is installed in the user directory under the anaconda3 folder).
export PATH="$HOME/anaconda3/bin:$PATH"
Save the file and execute the following command to make the changes take effect:
source ~/.bashrc
- Validate installation: Execute the following command to confirm if Anaconda has been successfully installed:
conda --version
If installed successfully, the version number of Anaconda will be displayed.
Your Ubuntu system has now been successfully set up with the Anaconda environment, allowing you to start using Anaconda for Python development and data science work.