AMP AMP

How to Install Anaconda 2021.05 on Ubuntu 21.04

To Install Anaconda 2021.05 on Ubuntu 21.04

Introduction:

Anaconda is a software distribution for Python and R programming languages that simplifies the process of package management and application deployment, as well as is the most effective tool for processing large amounts of data.

Installation Procedure:

Step 1: Check the OS version by using the below command

root@linuxhelp:~# lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 21.04
Release:	21.04
Codename:	hirsute

Step 2: Change to the ‘tmp’ directory by using the below command

root@linuxhelp:~# cd /tmp/

Step 3: Download the Anaconda Script file to install Anaconda by using the below command

root@linuxhelp:/tmp# curl -O https://repo.anaconda.com/archive/Anaconda3-2021.05-Linux-x86_64.sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  544M  100  544M    0     0  10.8M      0  0:00:50  0:00:50 --:--:-- 11.0M

Step 4: Install Anaconda by Bash script file using the below command

root@linuxhelp:/tmp# bash Anaconda3-2021.05-Linux-x86_64.sh 

Welcome to Anaconda3 2021.05

In order to continue the installation process, please review the license
agreement.

Step 5: Press Enter to continue installation by using the below command

Please, press ENTER to continue
>>> 
===================================
End User License Agreement - Anaconda Individual Edition
===================================

Copyright 2015-2021, Anaconda, Inc.

All rights reserved under the 3-clause BSD License:

This End User License Agreement (the "Agreement") is a legal agreement between you and Anaconda, Inc. ("Anaconda") and governs
 your use of Anaconda Individual Edition (which was formerly known as Anaconda Distribution).

Subject to the terms of this Agreement, Anaconda hereby grants you a non-exclusive, non-transferable license to:

  * Install and use the Anaconda Individual Edition (which was formerly known as Anaconda Distribution),
  * Modify and create derivative works of sample source code delivered in Anaconda Individual Edition from Anaconda's reposito
ry; and
  * Redistribute code files in source (if provided to you by Anaconda as source) and binary forms, with or without modificatio
THIS SOFTWARE IS PROVIDED BY ANACONDA AND ITS CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT L
IMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL AN
ACONDA BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITE

D TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
This Agreement is governed by and construed in accordance with the internal laws of the State of Texas without giving effect t
o any choice or conflict of law provision or rule that would require or permit the application of the laws of any jurisdiction
 other than those of the State of Texas. Any legal suit, action, or proceeding arising out of or related to this Agreement or 
the licenses granted hereunder by you must be instituted exclusively in the federal courts of the United States or the courts 

Anaconda has self-classified this software as Export Commodity Control Number (ECCN) 5D992.c, which includes mass market infor
mation security software using or performing cryptographic functions with asymmetric algorithms. No license is required for ex
port of this software to non-embargoed countries.

The Intel Math Kernel Library contained in Anaconda Individual Edition is classified by Intel as ECCN 5D992.c with no license 
required for export to non-embargoed countries.

The following packages listed on https://www.anaconda.com/cryptography are included in the repository accessible through Anaco
nda Individual Edition that relate to cryptography.

Last updated April 5, 2021

Step 6: Give Yes to Accept the license agreement

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




Anaconda3 will now be installed into this location:
/root/anaconda3

Step 7: Press ENTER to confirm the installation location for Anaconda

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

[/root/anaconda3] >>> 
PREFIX=/root/anaconda3
Unpacking payload ...
Collecting package metadata (current_repodata.json): done                                                                     
Solving environment: done


##Package Plan ##

environment location: /root/anaconda3

added / updated specs:
   - _ipyw_jlab_nb_ext_conf==0.1.0=py38_0
   - _libgcc_mutex==0.1=main
   - alabaster==0.7.12=pyhd3eb1b0_0
   - anaconda-client==1.7.2=py38_0
   - anaconda-navigator==2.0.3=py38_0
   - anaconda-project==0.9.1=pyhd3eb1b0_1
   - anaconda==2021.05=py38_0
Preparing transaction: done
Executing transaction: done
installation finished.

Step 8: Initialize the Installed Application

Do you wish the installer to initialize Anaconda3
by running conda init? [yes|no]
[no] >>> yes
no change     /root/anaconda3/condabin/conda
no change     /root/anaconda3/bin/conda
no change     /root/anaconda3/bin/conda-env
no change     /root/anaconda3/bin/activate
no change     /root/anaconda3/bin/deactivate
no change     /root/anaconda3/etc/profile.d/conda.sh
no change     /root/anaconda3/etc/fish/conf.d/conda.fish
no change     /root/anaconda3/shell/condabin/Conda.psm1
no change     /root/anaconda3/shell/condabin/conda-hook.ps1
no change     /root/anaconda3/lib/python3.8/site-packages/xontrib/conda.xsh
no change     /root/anaconda3/etc/profile.d/conda.csh
modified      /root/.bashrc

Step 9: Complete the installation by using the below command

root@linuxhelp:/tmp# source ~/.bashrc 

Step 10: Test the installation by running the ‘conda’ command

 (base) root@linuxhelp:/tmp# conda list

#packages in environment at /root/anaconda3:

#Name                    Version                   Build  Channel
_ipyw_jlab_nb_ext_conf    0.1.0                    py38_0  
_libgcc_mutex             0.1                        main  
alabaster                 0.7.12             pyhd3eb1b0_0  
anaconda                  2021.05                  py38_0  
anaconda-client           1.7.2                    py38_0  
anaconda-navigator        2.0.3                    py38_0  

anaconda-project          0.9.1              pyhd3eb1b0_1  
anyio                     2.2.0            py38h06a4308_1  
appdirs                   1.4.4                      py_0  
argh                      0.26.2                   py38_0  
argon2-cffi               20.1.0           py38h27cfd23_1  
asn1crypto                1.4.0                      py_0  
astroid                   2.5              py38h06a4308_1  
astropy                   4.2.1            py38h27cfd23_1  
async_generator           1.10               pyhd3eb1b0_0  
atomicwrites              1.4.0                      py_0  
attrs                     20.3.0             pyhd3eb1b0_0  
autopep8                  1.5.6              pyhd3eb1b0_0  
babel                     2.9.0              pyhd3eb1b0_0  
backcall                  0.2.0              pyhd3eb1b0_0  
backports                 1.0                pyhd3eb1b0_2  
backports.functools_lru_cache 1.6.4              pyhd3eb1b0_0  
zstd                      1.4.5                h9ceee32_0  

Step 11: Create an Environment named my_env

(base) root@linuxhelp:/tmp# conda create --name my_env python=3
Collecting package metadata (current_repodata.json): done
Solving environment: done

==> WARNING: A newer version of conda exists. <==
  current version: 4.10.1
  latest version: 4.11.0

Please update conda by running

    $ conda update -n base -c defaults conda



##Package Plan ##

  environment location: /root/anaconda3/envs/my_env

  added / updated specs:
    - python=3

Proceed ([y]/n)? y


Downloading and Extracting Packages
tk-8.6.11            | 3.0 MB    | ################################################################################### | 100% 
libstdcxx-ng-9.3.0   | 3.1 MB    | ################################################################################### | 
Executing transaction: done

#To activate this environment, use
#$ conda activate my_env
#To deactivate an active environment, use
#$ conda deactivate

Step 12: Activate the new Environment by using the below command

 (base) root@linuxhelp:/tmp# conda activate my_env

By this to Install Anaconda 2021.05 on Ubuntu 21.04 have been completed.

FAQ
Q
Does Anaconda install Python?
A
During the installation of the Anaconda platform, Python is installed, specifically, the CPython interpreter that we discussed previously.
Q
How do I open Anaconda in the Linux terminal?
A
In Linux, Open a terminal window and type anaconda-navigator.
Q
How to download the Anaconda Bash Script?
A
To download the Anaconda Bash Script by using the command curl -O https://repo.anaconda.com/archive/Anaconda3-2021.05-Linux-x86_64.sh
Q
How to remove an environment in Anaconda?
A
To remove an environment in Anaconda use the command "conda remove --name myenv --all"
Q
How to create an environment in Anaconda?
A
To create an environment in Anaconda use the command "conda create --name myenv"