How can I install the latest Anaconda with wget
Asked Answered
T

7

30

I'm looking at installing anaconda via wget on my server. I've come across https://askubuntu.com/questions/505919/installing-anaconda-python-on-ubuntu and http://ericjonas.com/anaconda.html and it looks promising . As of this writing the current version( https://www.continuum.io/downloads#_unix ) is 4.0 . How can I wget the latest version.

Torto answered 28/6, 2016 at 15:29 Comment(3)
wget just downloads stuff. So simply use wget URL to download URL.Guthry
this gets you the latest one for miniconda wget https://repo.anaconda.com/conda/Anaconda-latest-Linux-x86_64.sh -O ~/miniconda.sh idk how to do the same for full anaconda. Current answer gives you the 2018 not latest.Glyptics
@CharlieParker can you check if this works for you? wget https://repo.anaconda.com/archive/Anaconda3-2022.10-Linux-x86_64.shLundt
U
44

wget just downloads the file...

for python 2.7 :

wget https://repo.continuum.io/archive/Anaconda2-2018.12-Linux-x86_64.sh

for python3.X:

wget https://repo.continuum.io/archive/Anaconda3-2018.12-Linux-x86_64.sh

This is a shell script that guides you though the install.

Run the following line inside of the folder of the downloaded file to start the guided install...

for python 2.7:

bash Anaconda2-2018.12-Linux-x86_64.sh

for Python 3.X:

bash Anaconda3-2018.12-Linux-x86_64.sh

Check latest repos or if you want any specific version here: https://repo.continuum.io/archive/

Uranous answered 28/6, 2016 at 15:40 Comment(5)
Thank you, that worked. I'm assuming the .sh means shell script?Torto
That is no longer correct, because latest anaconda is 5.0.1. I found a link to latest miniconda, but I can't find a link to latest anaconda. repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.shCropland
Anaconda 5.1.0 is at repo.continuum.io/archive/Anaconda3-5.1.0-Linux-x86_64.shConlin
Find the latest version and change after wget. As pointed in above comment. Find at page: anaconda.com/download/#macosBinturong
that doesn't get you the latest anaconda.Glyptics
G
16

This will download the latest anaconda version from scraping the html from the website:

wget -O - https://www.anaconda.com/distribution/ 2>/dev/null | sed -ne 's@.*\(https:\/\/repo\.anaconda\.com\/archive\/Anaconda3-.*-Linux-x86_64\.sh\)\">64-Bit (x86) Installer.*@\1@p' | xargs wget
Gatling answered 23/2, 2019 at 8:51 Comment(2)
this gets you the latest one for miniconda wget https://repo.anaconda.com/conda/Anaconda-latest-Linux-x86_64.sh -O ~/miniconda.sh idk how to do the same for full anaconda. Current answer gives you the 2018 not latest.Glyptics
@CharlieParker I think this script correctly downloads the latest Anaconda3, not miniconda3 (as of today, Anaconda3-2022.10-Linux-x86_64.sh). Currently repo.anaconda.com/archive does not have something like Anaconda3-latest-Linux-x86_64.sh in repo.anaconda.com/archiveExobiology
A
6
wget \
    https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh \
    && bash Miniconda3-latest-Linux-x86_64.sh -b \
    && rm -f Miniconda3-latest-Linux-x86_64.sh \
    && eval "$(/home/$USER/miniconda3/bin/conda shell.bash  hook)"\
    && conda init
Ashleighashlen answered 29/5, 2018 at 17:31 Comment(3)
the line ./Miniconda3-latest-Linux-x86_64.sh says Please, press ENTER to continue .. is there an option to do silent install without this prompt?Falda
@Falda (untested) try the -b option. Also -help gives you the install options.Kenweigh
this gets you the latest one for miniconda wget https://repo.anaconda.com/conda/Anaconda-latest-Linux-x86_64.sh -O ~/miniconda.sh idk how to do the same for full anaconda. Current answer gives you the 2018 not latest.Glyptics
F
1

You can write the following bash script to automate the installing process.

cd ~

wget https://repo.continuum.io/archive/Anaconda3-2020.11-Linux-x86_64.sh
bash Anaconda3-2020.11-Linux-x86_64.sh -b -p ~/anaconda3
rm Anaconda3-2020.11-Linux-x86_64.sh
echo 'export PATH="~/anaconda3/bin:$PATH"' >> ~/.bashrc 

# Reload default profile
conda init

source ~/.bashrc

Furan answered 2/5, 2021 at 12:28 Comment(1)
this gets you the latest one for miniconda wget https://repo.anaconda.com/conda/Anaconda-latest-Linux-x86_64.sh -O ~/miniconda.sh idk how to do the same for full anaconda. Current answer gives you the 2018 not latest.Glyptics
M
0

I would just go to https://repo.anaconda.com/archive/ and copy the link of the most recent dated release and use wget with that. For example, right now it would be:

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

If you want a more automatic way you could try the following.

Using @philipper solution as a starting point I made some modifications.

  latest=$(wget -qO- https://repo.anaconda.com/archive/  | 
  grep -Eo "(href=\")(Anaconda3-.*-Linux-x86_64.sh)*\"" | 
  sed 's/href=//g' | sed 's/\"//g' | head -n 1); wget "https://repo.anaconda.com/archive/$latest"

The script will download the html of the repo archive page. Parse out all href tags matching Anaconda3 for Linux-x86 _64 (1st sed).

I strip out the "href=" and quotes from that output (2nd & 3rd sed).

I then get the first entry which will be the most recent and set it to the variable latest. Then use wget to download from the full url.

Either way, once it's downloaded you'll most likely need to make the .sh file executable then you can just run it like a normal .sh file.

I would just do it the first way but the second way does work for now at least.

I'm not really good at bash or using sed so my "automatic" solution might have some issues.

Murraymurre answered 14/11, 2022 at 21:54 Comment(0)
E
0

How to install latest Anaconda (2022)

$ ANACONDA_VERSION=$(curl -sS https://repo.anaconda.com/archive/ | grep -Po '(?<=Anaconda3-)([0-9.]*)(?=-Linux-x86_64)' | head -n1)
$ ANACONDA_URL="https://repo.anaconda.com/archive/Anaconda3-${ANACONDA_VERSION}-Linux-x86_64.sh"
$ wget $ANACONDA_URL && bash $(basename $ANACONDA_URL) -b
  • https://repo.anaconda.com/archive/ lists the release anaconda installer binaries, in the order of latest released.
  • The grep command grep -Po '(?<=Anaconda3-)([0-9\\.]*)(?=-Linux-x86_64)' extracts the \d\d\d\d.\d\d string, where Anaconda3- and -Linux-x86_64 are lookahead patterns. grep -Po is a useful, clean command to extract some regex pattern from a string (one could do with sed as well).
  • | head -n1 : choose whichever comes the first, i.e. the latest release.

Miniforge / Miniconda (automatic latest):

$ MINIFORGE_URL="https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh"
$ wget $MINIFORGE_URL && bash $(basename $MINIFORGE_URL) -b
$ MINICONDA_URL="https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh"
$ wget $MINICONDA_URL && bash $(basename $MINICONDA_URL) -b

Remarks

Note: the -b option is for the "batch mode" -- no question asked, accept the license, etc. and just install the anaconda for you. One may also find the option -p $CONDA_PREFIX useful.

Exobiology answered 14/11, 2022 at 23:0 Comment(0)
P
0

As of April 2023

For windows

wget https://repo.continuum.io/archive/Anaconda3-2023.03-Windows-x86_64.exe

For MacOS based on your system architecture

wget https://repo.continuum.io/archive/Anaconda3-2023.03-MacOSX-x86_64.sh

wget https://repo.continuum.io/archive/Anaconda3-2023.03-MacOSX-x86_64.pkg

wget https://repo.continuum.io/archive/Anaconda3-2023.03-MacOSX-arm64.sh

wget https://repo.continuum.io/archive/Anaconda3-2023.03-MacOSX-arm64.pkg

For linux based on your system architecture:

wget https://repo.continuum.io/archive/Anaconda3-2023.03-Linux-x86_64.sh

wget https://repo.continuum.io/archive/Anaconda3-2023.03-Linux-s390x.sh

wget https://repo.continuum.io/archive/Anaconda3-2023.03-Linux-ppc64le.sh

wget https://repo.continuum.io/archive/Anaconda3-2023.03-Linux-aarch64.sh

For future references,

Just move to here https://repo.anaconda.com/archive/ and download that is suitable for you.

Philippa answered 4/4, 2023 at 0:29 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.