Search
Close this search box.

How to install Anaconda in Ubuntu 18.04

Table of Contents

How to install Anaconda in Ubuntu 18.04

Anaconda is a free and open-source distribution of the Python and R programming languages for scientific computing (data science, machine learning applications, large-scale data processing, predictive analytics, etc.), that aims to simplify package management and deployment.

 

The distribution includes data-science packages suitable for Windows, Linux, and macOS. It is developed and maintained by Anaconda, Inc., which was founded by Peter Wang and Travis Oliphant in 2012.

 

As an Anaconda, Inc. product, it is also known as Anaconda Distribution or Anaconda Individual Edition, while other products from the company are Anaconda Team Edition and Anaconda Enterprise Edition, both of which are not free.

 

In this tutorial will teach you how to install Anaconda on an Ubuntu 18.04 server.

 

Step 1 — Download the Latest Version of Anaconda

 
 

From a web browser, go to the Anaconda Distribution page, available via the following link:

Anaconda Distribution

Find the latest Linux version and copy the installer bash script.

Step 2 — Download the Anaconda Bash Script

 
 

Logged into your Ubuntu 18.04 server as a sudo non-root user, move into the /tmp directory and use curl to download the link you copied from the Anaconda website:

cd /tmp
curl -O https://repo.anaconda.com/archive/Anaconda3-2020.07-Linux-x86_64.sh
 

Step 3 — Verify the Data Integrity of the Installer

 

Ensure the integrity of the installer with cryptographic hash verification through SHA-256 checksum:

sha256sum Anaconda3-2019.03-Linux-x86_64.sh
Output
45c851b7497cc14d5ca060064394569f724b67d9b5f98a926ed49b834a6bb73a Anaconda3-2020.07-Linux-x86_64.sh
 

Step 4 — Run the Anaconda Script

 
bash Anaconda3-2020.07-Linux-x86_64.sh

You’ll receive the following output to review the license agreement by pressing ENTER until you reach the end.

Output

Welcome to Anaconda3 2020.07

In order to continue the installation process, please review the license
agreement.
Please, press ENTER to continue
>>>
...
Do you approve the license terms? [yes|no]

When you get to the end of the license, type yes as long as you agree to the license to complete the installation.

Step 5 — Complete Installation Process

 
 

Once you agree to the license, you will be prompted to choose the location of the installation. You can press ENTER to accept the default location, or specify a different location.

Output
Anaconda3 will now be installed into this location:
/home/user/anaconda3

- Press ENTER to confirm the location
- Press CTRL-C to abort the installation
- Or specify a different location below

[/home/user/anaconda3] >>>

At this point, the installation will proceed. Note that the installation process takes some time.

Step 6 — Select Options

 
 

Once the installation is complete, you’ll receive the following output:

Output
...
installation finished.
Do you wish the installer to prepend the Anaconda3 install location
to PATH in your /home/user/.bashrc ? [yes|no]
[no] >>>

It is recommended that you type yes to use the conda command.

Step 7 — Activate Installation

 

You can now activate the installation with the following command:

source ~/.bashrc
 
 

Step 8 — Test Installation

 

Use the conda command to test the installation and activation:

conda list

You’ll receive the output of all the packages you have available through the Anaconda installation.

Step 9 — Set Up Anaconda Environments

 

You can create Anaconda environments with the conda create command. For example, a Python 3 environment named my_env can be created with the following command:

conda create --name my_env python=3

Activate the new environment like so:

conda activate my_env

Your command prompt prefix will change to reflect that you are in an active Anaconda environment, and you are now ready to begin work on a project

Tips and tricks
 

In this tutorial, you have successfully learned how to install Anaconda in Ubuntu 18.04. f you want to learn more about Anaconda check out these documents:

Anaconda Doc

If you want a server with Ubuntu 18.04 operating system, get started now with VPSie and get one month for free.

This tutorial is to help you based on this original tutorial https://www.digitalocean.com/community/tutorials/how-to-install-anaconda-on-ubuntu-18-04-quickstart please use our tutorial for notes and tips.

Create a Sudo user On Ubuntu

FAQ

Anaconda is a distribution of the Python and R programming languages used for data science and machine learning tasks. It comes with a collection of popular packages, tools, and libraries that are commonly used in data science workflows. Installing Anaconda on Ubuntu can provide you with a complete environment for working with data, without the need to install and configure individual packages separately.

To download Anaconda for Ubuntu, you can visit the Anaconda website and navigate to the download page. From there, you can select the appropriate version of Anaconda for your Ubuntu distribution and download the installer script.

Once you have downloaded the Anaconda installer script, you can install it using the following steps:

  1. Open a terminal window and navigate to the directory where the Anaconda installer script is located.
  2. Make the installer script executable using the following command:
bash
 
chmod +x Anaconda3-2021.05-Linux-x86_64.sh

 

Replace “Anaconda3-2021.05-Linux-x86_64.sh” with the name of the installer script you downloaded. 3. Run the installer script using the following command:

 
./Anaconda3-2021.05-Linux-x86_64.sh
 
  1. Follow the prompts to accept the license agreement, choose the installation location, and select whether or not to add Anaconda to your PATH environment variable.
  2. Once the installation is complete, close and reopen your terminal window to start using Anaconda.

To update Anaconda on Ubuntu, you can use the following command in a terminal window:

 

SQL
 
conda update anaconda

 

This will update all packages in the Anaconda distribution to their latest versions.

To create a new Anaconda environment on Ubuntu, you can use the following command:

lua
 
conda create --name myenv

 

Replace “myenv” with the name you want to give your new environment. To activate the new environment, use the following command:

 
conda activate myenv

 

Replace “myenv” with the name of the environment you want to activate.

To remove an Anaconda environment on Ubuntu, you can use the following command:

 

lua
conda env remove --name myenv

 

Replace “myenv” with the name of the environment you want to remove. Note that this will permanently delete the environment and all packages installed in it, so use it with caution.

Make a Comment
Share on
Facebook
Twitter
LinkedIn
Print
VPSie Cloud service

Fast and Secure Cloud VPS Service

Try FREE
For a month

The First 1 orders gets free discount today! Try Sign up on VPSie to get a chance to get the discount.