Skip to content

Instantly share code, notes, and snippets.

@cheeseprocedure
Last active February 28, 2017 17:36
Show Gist options
  • Save cheeseprocedure/8675753 to your computer and use it in GitHub Desktop.
Save cheeseprocedure/8675753 to your computer and use it in GitHub Desktop.
Installation of Python 2.7 on an Ubuntu 10.04 Server amd64 instance (using deadsnakes PPA).
#!/bin/bash
PYTHON27="/usr/bin/python2.7"
VENV_ROOT="/data/venv"
apt-get update
apt-get -y install python-software-properties
add-apt-repository ppa:fkrull/deadsnakes
apt-get update
apt-get -y install python2.7-dev python-pip
pip install virtualenv
mkdir -p ${VENV_ROOT}
virtualenv -p ${PYTHON27} ${VENV_ROOT}/python2.7
. ${VENV_ROOT}/python2.7/bin/activate
pip install fabric
# Additional argument to ensure argparse 1.2.1 available to pull down
pip install --allow-all-external -r "/tmp/pip-modules"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment