Logo
  • Ubuntu
  • CentOS
  • Debian
  • Fedora
  • RedHat

How to Install Anaconda on Ubuntu 20.04 - DesignLinux

Jun 19 2020
designlinux 0 Comments

Anaconda is a popular Python/R data science and machine learning platform, used for large-scale data processing, predictive analytics, and scientific computing.

Anaconda distribution ships with 250 open-source data packages, and more than 7,500 additional packages can be installed from the Anaconda repositories. It also includes the conda command-line tool and a desktop graphical user interface called Anaconda Navigator.

This tutorial will walk you through the installation of Anaconda Python Distribution on Ubuntu 20.04.

Installing Anaconda #

At the time of writing this article, the latest stable version of Anaconda is version 2020.02. Before downloading the installer script, visit the Downloads page and check if there is a new version of Anaconda for Python 3 available for download.

Complete the following steps to install Anaconda on Ubuntu 20.04:

  1. Anaconda Navigator is a QT-based GUI. If you are installing Anaconda on a desktop machine and you want to use the GUI application, install the following packages. Otherwise, skip this step.

    sudo apt install libgl1-mesa-glx libegl1-mesa libxrandr2 libxrandr2 libxss1 libxcursor1 libxcomposite1 libasound2 libxi6 libxtst6
  2. Download the Anaconda installation script with your web browser or wget:

    wget -P /tmp https://repo.anaconda.com/archive/Anaconda3-2020.02-Linux-x86_64.sh

    The download may take some time depending on your connection speed.

  3. This step is optional, but it is recommended to verify the data integrity of the script.

    Use the sha256sum command to display the script checksum:

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

    The output should look like this:

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

    Make sure the hash printed from the command above matches the one available at the Anaconda with Python 3 on 64-bit Linux page for your appropriate Anaconda version.

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

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

    You should see an output like the following:

    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. To scroll through the license, use the ENTER key. Once you’re done reviewing the license, you’ll be asked to approve the license terms:

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

    Type yes to accept the license, and you’ll be prompted to choose the installation location:

    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 fine for most users. Press ENTER to confirm the location.

    The installation may take some time, and once completed, the script will ask you whether you want to run conda init. Type 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 your system’s PATH.

    To activate the Anaconda installation, you can either close and re-open your shell or load the new PATH environment variable into the current shell session by typing:

    source ~/.bashrc

    To verify the installation type conda in your terminal.

That’s it! You have successfully installed Anaconda on your Ubuntu machine, and you can start using it.

If you installed Anaconda on a Desktop system, open the Navigator GUI by entering anaconda-navigator in your terminal:

Updating Anaconda #

Updating the Anaconda is a pretty straight forward process. Open your terminal and enter:

conda update --all

If there are updates, conda will display a list and prompt you to confirm the 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 update your Anaconda installation regularly.

Uninstalling Anaconda #

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

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

Open the ~/.bashrc file and remove the Anaconda directory from the PATH environment variable:

~/.bashrc
# >>> 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"
else
    if [ -f "/home/linuxize/anaconda3/etc/profile.d/conda.sh" ]; then
        . "/home/linuxize/anaconda3/etc/profile.d/conda.sh"
    else
        export PATH="/home/linuxize/anaconda3/bin:$PATH"
    fi
fi
unset __conda_setup
# <<< conda initialize <<<

Conclusion #

We’ve shown you how to install Anaconda on Ubuntu 20.04. You should now check the official Getting started with conda guide.

If you hit a problem or have feedback, leave a comment below.

ubuntu anaconda

Related

Tags: anaconda, ubuntu

How to Check if a File or Directory Exists in Bash

Prev Post

How to Enable HTTP/2 in Apache on Ubuntu

Next Post
Archives
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • July 2022
  • June 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
Categories
  • AlmaLinux
  • Android
  • Ansible
  • Apache
  • Arch Linux
  • AWS
  • Backups
  • Bash Shell
  • Bodhi Linux
  • CentOS
  • CentOS Stream
  • Chef
  • Cloud Software
  • CMS
  • Commandline Tools
  • Control Panels
  • CouchDB
  • Data Recovery Tools
  • Databases
  • Debian
  • Deepin Linux
  • Desktops
  • Development Tools
  • Docker
  • Download Managers
  • Drupal
  • Editors
  • Elementary OS
  • Encryption Tools
  • Fedora
  • Firewalls
  • FreeBSD
  • FTP
  • GIMP
  • Git
  • Hadoop
  • HAProxy
  • Java
  • Jenkins
  • Joomla
  • Kali Linux
  • KDE
  • Kubernetes
  • KVM
  • Laravel
  • Let's Encrypt
  • LFCA
  • Linux Certifications
  • Linux Commands
  • Linux Desktop
  • Linux Distros
  • Linux IDE
  • Linux Mint
  • Linux Talks
  • Lubuntu
  • LXC
  • Mail Server
  • Manjaro
  • MariaDB
  • MongoDB
  • Monitoring Tools
  • MySQL
  • Network
  • Networking Commands
  • NFS
  • Nginx
  • Nodejs
  • NTP
  • Open Source
  • OpenSUSE
  • Oracle Linux
  • Package Managers
  • Pentoo
  • PHP
  • Podman
  • Postfix Mail Server
  • PostgreSQL
  • Python
  • Questions
  • RedHat
  • Redis Server
  • Rocky Linux
  • Security
  • Shell Scripting
  • SQLite
  • SSH
  • Storage
  • Suse
  • Terminals
  • Text Editors
  • Top Tools
  • Torrent Clients
  • Tutorial
  • Ubuntu
  • Udemy Courses
  • Uncategorized
  • VirtualBox
  • Virtualization
  • VMware
  • VPN
  • VSCode Editor
  • Web Browsers
  • Web Design
  • Web Hosting
  • Web Servers
  • Webmin
  • Windows
  • Windows Subsystem
  • WordPress
  • Zabbix
  • Zentyal
  • Zorin OS
Visits
  • 33
  • 1,201
  • 609,649

DesignLinux.com © All rights reserved

Go to mobile version