In this article we will show you how to install Anaconda Python on an Ubuntu 16.04 server. Anaconda is a free and open source package manager for the Python and R programming languages, and it is mainly used for machine learning and data science related applications. Anaconda comes with more than 1000 open-source packages and it works on all major operating systems including Linux, Mac OS and Windows. Installing Anaconda on Ubuntu 16.04 is fairly easy and straight to the point task, and it shouldn’t take more then 10 minutes to install it. Let’s get started.
Install Anaconda
The recommended approach to install Anaconda on Ubuntu 16.04 is to download the install script, verify the script integrity and then run the script.
At the time of the writing of this article the latest version of Anaconda is 5.2.0. Before downloading the installation script you should check the Anaconda Download page for a new version.
Switch to the /tmp
directory and download the latest Anaconda installation script with the following commands:
Once the script is downloaded, you can continue with the Anaconda Python installation.
Start the Anaconda installation by running the script:
The script will print the following output:
Press ENTER to continue and then press ENTER to scroll through the license. Next, you will be asked to accept the license terms:
Type yes and hit ENTER and you will be prompted to accept the default Anaconda installation path:
To confirm the default location press ENTER and the Anaconda installation will start which may take some time depending on your server resources.
Next, the installer will ask you if you want to prepend the Anaconda install location to the PATH in your ~/.bashrc file. Again type yes and press ENTER:
Once the Anaconda installation is completed, the installer will ask you if you want to install Microsoft VSCode. If you do not need the Microsoft VSCode code editor, type no and press ENTER.
To activate your Anaconda installation you will either need to open a new terminal or to source the ~/.bashrc
file:
You can now verify your Anaconda installation by running the following command:
The output below shows the conda version:
How to Upgrading Anaconda
You should regularly upgrade your Anaconda installation whenever a new version is available.
To upgrade Anaconda first you need to upgrade the conda tool with the following command:
This process may take some time and if there is a new update available you will be promoted to accept the update.
Once the conda utility is updated you can proceed with Anaconda update by running the following command:
Same as before you will be prompted to accept the update.
Congratulations. You have successfully installed Anaconda Python on Ubuntu 16.04. For the official documentation of Anaconda Python visit the official page, by clicking on this link.
Of course you don’t have to install Anaconda Python on a Ubuntu 16.04, if you use one of our Python VPS Hosting Solutions, in which case you can simply ask our expert Linux admins to install Anaconda Python on Ubuntu 16.04 for you. They are available 24×7 and will take care of your request immediately. You can also consider reading our guide How to Install Anaconda on Ubuntu 20.04.
PS. If you liked this post on how to install Anaconda Python on Ubuntu 16.04, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.
Thank you for a well-written and structured article. Extremely useful for a newbie. You have more information than the usually good anaconda documentation itself.
hello when i was trying to install anaconda in my ubuntu 16.04 i had this problem
anaconda3/pkgs/python-3.6.5-hc3d631a_2/bin/python : impossible d’exécuter le fichier binaire : Erreur de format pour exec()
when i was execute this command bash Anaconda3-5.2.0-Linux-x86_64.sh
This usually means that you are trying to run an executable compiled for different architecture. Make sure that you are downloading the correct binary file for the correct platform.