Created
April 11, 2017 18:57
-
-
Save dkrusky/636ba9bd296a354347d31add70a311e6 to your computer and use it in GitHub Desktop.
Install specified version of Python from source on Debian 8
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 | |
if [ -z "$1" ] | |
then | |
echo "Syntax: install-python <version>" | |
echo "Example: install-python 3.6.1" | |
exit; | |
fi | |
apt-get install packaging-dev debian-keyring devscripts equivs python python-dev python3 python3-dev python3-pip libxml2-dev libacl1-dev direnv | |
wget https://www.python.org/ftp/python/$1/Python-$1.tgz | |
tar xvf Python-$1.tgz | |
cd Python-$1 | |
./configure --enable-optimizations | |
make -j8 | |
sudo make install | |
if [ "$(echo $1 | head -c 1)" == "3" ] | |
then | |
easy_install3 -U pip | |
exit; | |
fi | |
easy_install -U pip |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment