Last active
March 26, 2017 00:10
-
-
Save PhilipTrauner/8406a81c3a3b77071adb3bc8ab5bae68 to your computer and use it in GitHub Desktop.
Build Python 3.6.1 on Debian and derivatives
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
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