How to install Anaconda on Ubuntu 20.04

This article was first published in: https://www.itcoder.tech/posts/how-to-install-anaconda-on-ubuntu-20-04/

Anaconda is a popular Python/R data science and machine learning platform, big data processing, predictive analysis, and scientific computing.

The Anaconda distribution comes with 250 open source data packages, and more than 7,500 packages can be installed from the Anaconda software source. It also contains a command line tool and a graphical user interface called "Anaconda Navigator".

This guide will explain to you the installation process of Anaconda Python distribution on Ubuntu 20.04.

One, install Anaconda

At the time of writing this article, the latest binding version of Anaconda is 2020.02. Before downloading the installation script, browse the download page, and check if there is an updated Anaconda available.

Complete the following steps on Ubuntu 20.04 to install Anaconda.

  1. Anaconda Navigator is a GUI based on QT. If you install Anaconda on a desktop machine and you want to use GUI applications, install the following packages. Otherwise, skip the steps below.
sudo apt install libgl1-mesa-glx libegl1-mesa libxrandr2 libxrandr2 libxss1 libxcursor1 libxcomposite1 libasound2 libxi6 libxtst6
  1. Use your browser or wget to download the Anaconda installation script:
wget -P /tmp https://repo.anaconda.com/archive/Anaconda3-2020.02-Linux-x86_64.sh

The download will take some time, depending on your internet speed.

  1. This step is optional, but we recommend that you verify the data integrity of the script.

Use the sha256sum command to display the checksum of the script:

sha256sum /tmp/Anaconda3-2020.02-Linux-x86_64.sh

The output is similar to:

2 b9f088b2022edb474915d9f69a803d6449d5fdb4c303041f60ac4aefcc208bb  /tmp/Anaconda3-2020.02-Linux-x86_64.sh

Make sure that the hash value printed by the above command is the same as the Anaconda hash value of the corresponding version of the Anaconda with Python 3 on 64-bit Linux page page.

https://docs.anaconda.com/anaconda/install/hashes/Anaconda3-2020.02-Linux-x86_64.sh-hash/
  1. Run the script to start the installation process:
bash /tmp/Anaconda3-2020.02-Linux-x86_64.sh

You should see the following output:

Welcome to Anaconda3 2020.02

In order to continue the installation process, please review the license
agreement.
Please, press ENTER to continue>>>

Press ENTER to continue. Swipe down to read the agreement and use the ENTER button. Once you have read the agreement, you will be asked whether to accept the terms of the agreement:

Do you approve the license terms?[yes|no]

Enter yes to accept the agreement, and you will be prompted to choose the installation path:

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

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

The default location should be directly available to most users. Press Enter to confirm the position.

The installation process will take some time, and once completed, the script will ask you if you want to run conda init. Enter yes.

Installation finished.
Do you wish the installer to initialize Anaconda3
by running conda init?[yes|no]

This will add the command line tool conda to the system's PATH environment variable.

To activate Anaconda, you can close and reopen your shell or enter the following command in the current shell session to reload the PATH environment variable:

source ~/.bashrc

To verify the installation process, enter conda in your terminal.

that's it. You have successfully installed Anaconda on your Ubuntu machine, and you can start using it.

If you install Anaconda on a desktop system, enter anaconda-navigator in the terminal to open the Navigator GUI:

Two, upgrade Anaconda

Upgrading Anaconda is a very straightforward process. Open your terminal and enter:

conda update --all

If there is an update, conda will display a list and prompt you to confirm whether to update:

The following packages will be UPDATED:

 anaconda-navigator                          1.9.12-py37_0 -->1.9.12-py37_1
 conda                                        4.8.2-py37_0 -->4.8.3-py37_0
 conda-package-han~1.6.0-py37h7b6447c_0 -->1.6.1-py37h7b6447c_0

Proceed([y]/n)?

It is a good idea to upgrade Anaconda regularly.

Three, uninstall Anaconda

If you want to uninstall Anaconda from your Ubuntu system, remove the Anaconda installation directory and other files created during the installation process:

rm -rf ~/anaconda3 ~/.condarc ~/.conda ~/.continuum

Open ~/.bashrc and remove Anaconda from the environment variables:

# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init'!!
__ conda_setup="$('/home/linuxize/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"if[ $?-eq 0]; then
 eval "$__conda_setup"elseif[-f "/home/linuxize/anaconda3/etc/profile.d/conda.sh"]; then
  ." /home/linuxize/anaconda3/etc/profile.d/conda.sh"elseexport PATH="/home/linuxize/anaconda3/bin:$PATH"
 fi
fi
unset __conda_setup
# <<< conda initialize <<<

Four, summary##

We have shown you how to install Anaconda on Ubuntu 20.04. Now you should take a look at the Official conda Getting Started Guide.

If you have any questions, please contact us in the following ways:

WeChat:

WeChat group: add the above WeChat, remark the WeChat group

QQ: 3217680847

QQ Group: 82695646

Recommended Posts

How to install Anaconda3 on Ubuntu 18.04
How to install Anaconda on Ubuntu 20.04
How to install Anaconda on Ubuntu 18.04 [Quick Start]
How to install Ruby on Ubuntu 20.04
How to install Java on Ubuntu 20.04
How to install VirtualBox on Ubuntu 20.04
How to install Elasticsearch on Ubuntu 20.04
How to install Protobuf 3 on Ubuntu
How to install Nginx on Ubuntu 20.04
How to install Apache on Ubuntu 20.04
How to install Git on Ubuntu 20.04
How to install Node.js on Ubuntu 16.04
How to install Vagrant on Ubuntu 20.04
How to install Bacula-Web on Ubuntu 14.04
How to install PostgreSQL on Ubuntu 16.04
How to install Git on Ubuntu 20.04
How to install Memcached on Ubuntu 18.04
How to install Jenkins on Ubuntu 16.04
How to install MemSQL on Ubuntu 14.04
How to install Go on Ubuntu 20.04
How to install MongoDB on Ubuntu 16.04
How to install Mailpile on Ubuntu 14.04
How to install PrestaShop on Ubuntu 16.04
How to install Skype on Ubuntu 20.04
How to install Jenkins on Ubuntu 20.04
How to install KVM on Ubuntu 18.04
How to install KVM on Ubuntu 20.04
How to install opencv3.0.0 on ubuntu14.04
How to install Prometheus on Ubuntu 16.04
How to install Jenkins on Ubuntu 18.04
How to install Apache on Ubuntu 20.04
How to install R on Ubuntu 20.04
How to install Moodle on Ubuntu 16.04
How to install Solr 5.2.1 on Ubuntu 14.04
How to install Teamviewer on Ubuntu 16.04
How to install MariaDB on Ubuntu 20.04
How to install Nginx on Ubuntu 20.04
How to install Mono on Ubuntu 20.04
How to install Go on Ubuntu 20.04
How to install Zoom on Ubuntu 20.04
How to install Nginx on Ubuntu 16.04
How to install OpenCV on Ubuntu 20.04
How to install Spotify on Ubuntu 20.04
How to install Postman on Ubuntu 18.04
How to install Go 1.6 on Ubuntu 16.04
How to install Go on Ubuntu 18.04
How to install MySQL on Ubuntu 14.04
How to install PostgreSQL on Ubuntu 20.04
How to install VLC on Ubuntu 18.04
How to install TeamViewer on Ubuntu 20.04
How to install Webmin on Ubuntu 20.04
How to install Docker Compose on Ubuntu 18.04
How to install Ubuntu on Raspberry Pi
How to install Bacula Server on Ubuntu 14.04
How to install MySQL on Ubuntu 18.04 (linux)
How to install Apache Kafka on Ubuntu 18.04
How to install Apache Maven on Ubuntu 20.04
How to install Apache Tomcat 8 on Ubuntu 16.04
How to install Python2 on Ubuntu20.04 ubuntu/focal64
How to install GCC compiler on Ubuntu 18.04
How to install Graylog 1.x on Ubuntu 14.04.