Skip to content

Instantly share code, notes, and snippets.

@PhilipTrauner
Last active March 26, 2017 00:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PhilipTrauner/8406a81c3a3b77071adb3bc8ab5bae68 to your computer and use it in GitHub Desktop.
Save PhilipTrauner/8406a81c3a3b77071adb3bc8ab5bae68 to your computer and use it in GitHub Desktop.
Build Python 3.6.1 on Debian and derivatives
set -e
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root" 1>&2
exit 1
fi
# Takes ages on slow hardware
OPTIMISED_BUILD=false
apt-get install libbz2-dev libsqlite3-dev libreadline-dev zlib1g-dev libncurses5-dev libssl-dev libgdbm-dev build-essential
wget https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tar.xz
tar xf Python-3.6.1.tar.xz
cd Python-3.6.1
if [ "$OPTIMISED_BUILD" = false ]; then
./configure
else
./configure --enable-optimizations
fi
make -j4
make install
echo "Press [ENTER] to continue."
read _
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment