Install Anaconda on Ubuntu (or Linux) via command line

Question:

I would like to install Anaconda on a remote server.

The server is running Ubuntu 12.04.

I only have access to this server via SSH.

How can I install Anaconda via the command line?

Asked By: JNevens

||

Answers:

Something along the lines of:

wget https://repo.anaconda.com/archive/Anaconda3-2020.07-Linux-x86_64.sh

to get the installer for 64 bit linux followed by:

bash Anaconda3-2020.07-Linux-x86_64.sh

You can get the latest release from here

Answered By: Greg Lever

Please take a look at the Anaconda repo archive page and select an appropriate version that you’d like to install.

After that, just do:

 # replace this `Anaconda3-version.num-Linux-x86_64.sh` with your choice
~$ wget -c https://repo.continuum.io/archive/Anaconda3-vers.num-Linux-x86_64.sh
~$ bash Anaconda3-version.num-Linux-x86_64.sh

Concrete Example:

As of this writing, Anaconda3-2020.07 is the latest version. So,

~$ wget -c https://repo.anaconda.com/archive/Anaconda3-2020.07-Linux-x86_64.sh
~$ bash Anaconda3-2020.07-Linux-x86_64.sh

P.S. Based on comments, this should also work in CentOS systems.

Answered By: kmario23
$ sudo bash Anaconda2-4.3.0-Linux-x86_64.sh

Video tutorial::
https://youtu.be/JP60kTsVJ8E

Answered By: rjrajsaha

Just download the anaconda installer and execute it as it is a shell script. Follow the steps :

  1. In the terminal type “wget https://repo.continuum.io/archive/Anaconda-2.3.0-Linux-x86_64.sh

  2. The file will be downloaded in current directory. Now execute the downloaded file by “bash ./Anaconda-2.3.0-Linux-x86_64.sh”

  3. Restart the terminal. This is very important for python version provided by anaconda to be set to default for that user.

Note- Try using environment for using different version of python. Changing the default python version for root might result in non functioning of some functionalities like yum.

Answered By: Prashant Kumar

You can do as Prashant said or you can use bash scripts to automate the installation. Just simply copy and paste depending on the version of Python you want

If you are trying to it entirely in command line you use a bash script
python 2 anaconda install bash script:

# Go to home directory
cd ~

# You can change what anaconda version you want at 
# https://repo.continuum.io/archive/
wget https://repo.continuum.io/archive/Anaconda2-4.2.0-Linux-x86_64.sh
bash Anaconda2-4.2.0-Linux-x86_64.sh -b -p ~/anaconda
rm Anaconda2-4.2.0-Linux-x86_64.sh
echo 'export PATH="~/anaconda/bin:$PATH"' >> ~/.bashrc 

# Refresh basically
source .bashrc

conda update conda

python 3 anaconda install bash script

# Go to home directory
cd ~

# You can change what anaconda version you want at 
# https://repo.continuum.io/archive/
wget https://repo.continuum.io/archive/Anaconda3-4.2.0-Linux-x86_64.sh
bash Anaconda3-4.2.0-Linux-x86_64.sh -b -p ~/anaconda
rm Anaconda3-4.2.0-Linux-x86_64.sh
echo 'export PATH="~/anaconda/bin:$PATH"' >> ~/.bashrc 

# Refresh basically
source .bashrc

conda update conda

Source: https://medium.com/@GalarnykMichael/install-python-on-ubuntu-anaconda-65623042cb5a

1 – Go to Anaconda Repository, find the installation for your OS and copy the address

2 – wget {paste}. Ex: https://repo.continuum.io/archive/Anaconda3-5.2.0-Linux-x86_64.sh

3 – Execute with: bash. Ex: bash Anaconda3-5.2.0-Linux-x86_64.sh

Run!

Answered By: Pablo Ruiz Ruiz

Download Anaconda for linux, place in your ubuntu system through WinScp, then
$ sudo bash Anaconda2-4.3.0-Linux-x86_64.sh

after this logout of your ssh session and then login, you will get base environment.

Answered By: shivaraj karki