Forked from mGalarnyk/Install_Anaconda_Ubuntu_Python3.sh
Last active
May 29, 2019 11:56
-
-
Save IslamAlam/ec7b842fac8fe0e8a69aa0ec8cdf6469 to your computer and use it in GitHub Desktop.
Install Anaconda on Ubuntu (Python 3) for the blog https://medium.com/@GalarnykMichael/install-python-on-ubuntu-anaconda-65623042cb5a#.8fn64sfa5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 :)" |
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
Bash script to install the latest Anaconda programmatically without the need to check it manually
Ref: Download-link-programmatically