Skip to content

Instantly share code, notes, and snippets.

@jeyraof
Last active August 29, 2015 14:00
Show Gist options
  • Save jeyraof/11360407 to your computer and use it in GitHub Desktop.
Save jeyraof/11360407 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
sudo add-apt-repository ppa:fkrull/deadsnakes
sudo apt-get update
wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O /tmp/ez_setup.py
py_ver=`python -c 'import sys; print ".".join(str(x) for x in sys.version_info[:2])'`
for i in 2.6 2.7 3.2 3.3 3.4
do
if [ "$i" != "$py_ver" ]
then
sudo apt-get -y install python$i python$i-dev
sudo python$i /tmp/ez_setup.py
sudo easy_install-$i pip
else
echo "Default Python version is $i, installing dev libraries and pip only"
sudo apt-get install -y python$-dev
sudo python$i /tmp/ez_setup.py
sudo easy_install-$i pip
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment