Skip to content

Instantly share code, notes, and snippets.

@MasterGroosha
Last active February 4, 2021 10:45
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MasterGroosha/f46e24ec8dd5c0ce5cd872a479a19c96 to your computer and use it in GitHub Desktop.
Save MasterGroosha/f46e24ec8dd5c0ce5cd872a479a19c96 to your computer and use it in GitHub Desktop.
#!/bin/bash
PYVERSION="3.8.2"
if [[ $EUID -ne 0 ]]; then
sudo apt install -y gcc build-essential checkinstall libreadline-gplv2-dev libncursesw5-dev libssl-dev \
libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev
else
apt install -y gcc build-essential checkinstall libreadline-gplv2-dev libncursesw5-dev libssl-dev \
libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev
fi
cd /tmp
wget https://www.python.org/ftp/python/${PYVERSION}/Python-${PYVERSION}.tgz
tar zxf Python-${PYVERSION}.tgz
cd Python-${PYVERSION}
./configure --enable-optimizations
if [[ $EUID -ne 0 ]]; then
sudo make -j$(nproc) altinstall
else
make -j$(nproc) altinstall
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment