How to Install Anaconda on Debian 10

[ad_1]

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

Anaconda distribution ships with more than 1,500 open-source data packages. It also includes the conda command-line tool and a desktop graphical user interface called Anaconda Navigator.

In this tutorial, we will walk you through downloading and installing Anaconda Python Distribution on Debian 10.

Installing Anaconda #

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

Debian Download Anaconda

Use wget
or curl
to download the Anaconda installation script:

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

The download may take some time depending on your connection speed. Once done, verify the data integrity of the script with the sha256sum command:

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

You should see an output like the following:

46d762284d252e51cd58a8ca6c8adc9da2eadc82c342927b2f66ed011d1d8b53  /tmp/Anaconda3-2019.10-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 the Anaconda version you’re installing.

https://docs.anaconda.com/anaconda/install/hashes/Anaconda3-2019.10-Linux-x86_64.sh-hash/
Debian Anaconda Installer Hash

Run the script to start the Anaconda installation process:

sh /tmp/Anaconda3-2019.10-Linux-x86_64.sh
Welcome to Anaconda3 2019.10

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

Press ENTER to continue and then press SPACE to scroll through the license. Once you’re done reviewing the license, you’ll be prompted to accept the license terms:

Do you accept the license terms? [yes|no]
[no] >>> yes

Type yes to accept the license, and the script will ask you 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 is fine for most users. Press ENTER to confirm the location, and the installation process will start.

The installation may take some time. Once it is completed, you’ll see the following:

Preparing transaction: done
Executing transaction: done
installation finished.
Do you wish the installer to initialize Anaconda3
by running conda init? [yes|no]

Type yes, press ENTER and the script will add conda to your PATH
:

==> For changes to take effect, close and re-open your current shell. <==

If you'd prefer that conda's base environment not be activated on startup, 
   set the auto_activate_base parameter to false: 

conda config --set auto_activate_base false

Thank you for installing Anaconda3!

===========================================================================

Anaconda and JetBrains are working together to bring you Anaconda-powered
environments tightly integrated in the PyCharm IDE.

PyCharm for Anaconda is available at:
https://www.anaconda.com/pycharm

To activate the Anaconda installation load the new PATH environment variable that was added by the Anaconda installer into the current shell session with the following command:

source ~/.bashrc

To verify that Anaconda was successfully installed use the conda command:

conda info
     active environment : base
    active env location : /home/linuxize/anaconda3
            shell level : 1
       user config file : /home/linuxize/.condarc
 populated config files : 
          conda version : 4.7.12
    conda-build version : 3.18.9
         python version : 3.7.4.final.0
       virtual packages : 
       base environment : /home/linuxize/anaconda3  (writable)
           channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /home/linuxize/anaconda3/pkgs
                          /home/linuxize/.conda/pkgs
       envs directories : /home/linuxize/anaconda3/envs
                          /home/linuxize/.conda/envs
               platform : linux-64
             user-agent : conda/4.7.12 requests/2.22.0 CPython/3.7.4 Linux/4.19.0-5-amd64 debian/10 glibc/2.28
                UID:GID : 1000:1000
             netrc file : None
           offline mode : False

Updating Anaconda #

Updating Anaconda is a pretty straight forward process. Start by updating the conda tool with:

conda update conda

When prompted to confirm the update, type y to proceed.

Once conda is updated, proceed with the Anaconda update:

conda update anaconda

Same as before, when prompted, type y to proceed.

You should regularly update your Anaconda installation.

Uninstalling Anaconda #

To uninstall Anaconda from your Debian system, first remove the directory
where you have installed Anaconda:

rm -rf ~/anaconda3

Edit 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 <<<

Run the following rm
command to remove the hidden files and folders from the user home directory:

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

Conclusion #

Now that you have downloaded and installed Anaconda on your Debian system, you can check the official Getting started with conda
guide.

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

[ad_2]

Source link

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.