Created
June 21, 2022 11:49
-
-
Save aviadhahami/65934da48f3626482c63c646a29d0534 to your computer and use it in GitHub Desktop.
Download, build and install all python 3.x versions
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/bash | |
# Verify we have wget and build tools | |
apt-get update && apt-get install -y wget gcc make | |
# add or remove python versions; full index @ https://www.python.org/ftp/python/ | |
cd /tmp &&\ | |
wget https://www.python.org/ftp/python/3.5.10/Python-3.5.10.tgz &&\ | |
wget https://www.python.org/ftp/python/3.6.9/Python-3.6.9.tgz &&\ | |
wget https://www.python.org/ftp/python/3.7.9/Python-3.7.9.tgz &&\ | |
wget https://www.python.org/ftp/python/3.8.9/Python-3.8.9.tgz | |
# extract zips & cleanup | |
while read p; do | |
cd /tmp && tar -zxf $p && rm -rf $p | |
done <<< `ls | grep Python-3.` | |
# build and install | |
while read p; do | |
cd ./$p && ./configure && make && make install | |
done <<< `ls | grep Python-3.` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment