Skip to content

Instantly share code, notes, and snippets.

@endemics
Created December 10, 2015 01:08
Show Gist options
  • Save endemics/d2ac8ad083f215d215f8 to your computer and use it in GitHub Desktop.
Save endemics/d2ac8ad083f215d215f8 to your computer and use it in GitHub Desktop.
Install python stuff in an unprivileged way
#!/bin/bash
# requires curl and python 2.7 to be installed
curl -s -o get-pip.py -L https://bootstrap.pypa.io/get-pip.py && \
python get-pip.py --root $(pwd)/tmppython
PATH=$(pwd)/tmppython/usr/local/bin:$PATH \
PYTHONPATH=$(pwd)/tmppython/usr/local/lib/python2.7/dist-packages/:$PYTHONPATH \
pip install --root $(pwd)/tmppython virtualenv
PATH=$(pwd)/tmppython/usr/local/bin:$PATH \
PYTHONPATH=$(pwd)/tmppython/usr/local/lib/python2.7/dist-packages/:$PYTHONPATH \
virtualenv .
. bin/activate && \
./bin/pip install jinja2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment