How to install Anaconda on Ubuntu?
To install Anaconda on Ubuntu, follow these steps:
- Download Anaconda: Visit the official Anaconda website (https://www.anaconda.com/products/individual#Downloads) and download the Anaconda installer package for Linux. Choose the 64-bit .sh file (e.g., Anaconda3-2020.02-Linux-x86_64.sh).
- Open the terminal: press Ctrl+Alt+T on Ubuntu or find it in the application menu.
- Switch to the download directory: Use the cd command in the terminal to navigate to the directory where you downloaded Anaconda. For example, if the download directory is “Downloads”, type: cd Downloads.
- Change installation package permissions: Execute the following command to change the permission of the .sh file: chmod +x Anaconda3-2020.02-Linux-x86_64.sh
- Run the installation program by executing the following command: ./Anaconda3-2020.02-Linux-x86_64.sh
- Follow the prompts to install Anaconda: You will see a series of installation prompts, including some license agreements and installation path options. Follow the prompts to complete the installation. By default, Anaconda will be installed in your home directory.
- Installation completion: After the installation is finished, you will see a message indicating a successful installation. You have the option to add Anaconda to the system’s PATH environment variable. If you choose not to add it, you can still use Anaconda in the terminal, but you will need to manually activate Anaconda in each new terminal session.
- Restart the terminal: Close the terminal and open a new one.
- Activate Anaconda by running the following command in the opened terminal: source ~/.bashrc.
- To verify the installation, run the following command to confirm if Anaconda has been successfully installed: conda –version.
If everything goes well, you will see the version number of Anaconda. You can now use the various tools and packages provided by Anaconda for data science and machine learning development.