The best way to install Anaconda is to download the latest Anaconda installer bash script, verify it, and then run it.
Find the latest version of Anaconda for Python 3 at the Downloads page accessible via the Anaconda home page. At the time of writing, the latest version is 5.2, but you should use a later stable version if it is available.
Next, change to the
/tmp directory on your server. This is a good directory to download ephemeral items, like the Anaconda bash script, which we won’t need after running it.
We’ll use the
curl command-line tool to download the script. Install
sudo apt install curl
curl to download the link that you copied from the Anaconda website:
curl -O https://repo.continuum.io/archive/Anaconda3-2018.12-Linux-x86_64.sh
Now we can run the script:
You’ll receive the following output:
Welcome to Anaconda3 5.2.0
In order to continue the installation process, please review the license
Please, press ENTER to continue
ENTER to continue and then press
ENTER to read through the license. Once you’re done reading the license, you’ll be prompted to approve the license terms:
Do you approve the license terms? [yes|no]
As long as you agree, type
At this point, you’ll be prompted to choose the location of the installation. You can press
ENTER to accept the default location, or specify a different location to modify it.
Anaconda3 will now be installed into this location:
- Press ENTER to confirm the location
- Press CTRL-C to abort the installation
- Or specify a different location below
The installation process will continue. Note that it may take some time.
Once installation is complete, you’ll receive the following output:
Do you wish the installer to prepend the Anaconda3 install location
to PATH in your /home/sammy/.bashrc ? [yes|no]
yes so that you can use the
conda command. You’ll receive the following output next:
Appending source /home/YourName/anaconda3/bin/activate to /home/YourName/.bashrc
A backup will be made to: /home/YourName/.bashrc-anaconda3.bak
Finally, you’ll receive the following prompt regarding whether or not you would like to download Visual Studio Code (or VSCode), a free and open-source editor for code developed by Microsoft that can run on Linux. You can learn more about the editor on the official Visual Studio Code website.
At this point, you can decide whether or not to download the editor now by typing
Anaconda is partnered with Microsoft! Microsoft VSCode is a streamlined
code editor with support for development operations like debugging, task
running and version control.
To install Visual Studio Code, you will need:
- Administrator Privileges
- Internet connectivity
Visual Studio Code License: https://code.visualstudio.com/license
Do you wish to proceed with the installation of Microsoft VSCode? [yes|no]
In order to activate the installation, close the Terminal window, and reopen a new one.