Skip to content

Instantly share code, notes, and snippets.

@grmnfrnndz
Last active September 28, 2023 00:28
Show Gist options
  • Save grmnfrnndz/437db82fb82ece137b819ded4b55136c to your computer and use it in GitHub Desktop.
Save grmnfrnndz/437db82fb82ece137b819ded4b55136c to your computer and use it in GitHub Desktop.
sudo apt-get update
sudo apt-get install build-essential checkinstall
sudo apt-get install libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev

wget https://www.python.org/ftp/python/2.7.18/Python-2.7.18.tgz

sudo tar xzf Python-2.7.18.tgz

cd Python-2.7.18

./configure --enable-optimizations
make
sudo make altinstall

# make altinstall is used to prevent replacing the default python binary file /usr/bin/python.

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