Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save IslamAlam/ec7b842fac8fe0e8a69aa0ec8cdf6469 to your computer and use it in GitHub Desktop.
Save IslamAlam/ec7b842fac8fe0e8a69aa0ec8cdf6469 to your computer and use it in GitHub Desktop.
#!/bin/sh
# Go to home directory
cd ~
# https://stackoverflow.com/questions/22510705/get-the-latest-download-link-programmatically
# Determine latest version:
latestVer=$(curl 'https://repo.anaconda.com/archive/' |
grep -oP 'href="Anaconda3-\K[0-9]+\.[0-9]+' |
sort -t. -rn -k1,1 -k2,2 | head -1)
# Echo latest version:
echo "Anaconda3-${latestVer}-Linux-x86_64.sh"
# Download latest versanaconda-navigatorion:
curl "https://repo.anaconda.com/archive/Anaconda3-${latestVer}-Linux-x86_64.sh" > Anaconda3-latest-Linux-x86_64.sh
bash Anaconda3-latest-Linux-x86_64.sh -b -p ~/anaconda
rm Anaconda3-latest-Linux-x86_64.sh
echo '. ~/anaconda/etc/profile.d/conda.sh' >> ~/.bashrc
# Refresh basically
source $HOME/.bashrc
conda update conda
#conda install -c anaconda anaconda-navigator
echo "Installation is complete :)"
@IslamAlam
Copy link
Author

Bash script to install the latest Anaconda programmatically without the need to check it manually

Ref: Download-link-programmatically

@IslamAlam
Copy link
Author

git clone https://gist.github.com/IslamAlam/ec7b842fac8fe0e8a69aa0ec8cdf6469 install
chmod +x install/Install_Latest_Anaconda_Ubuntu_Python3.sh
./install/Install_Latest_Anaconda_Ubuntu_Python3.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment