Skip to content

Instantly share code, notes, and snippets.

@mbrochh
Created February 5, 2014 15:32
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mbrochh/8826147 to your computer and use it in GitHub Desktop.
Save mbrochh/8826147 to your computer and use it in GitHub Desktop.
Installing virtualenvwrapper on Webfaction
#!/bin/bash
PYTHONVER=2.7
PYTHON=python${PYTHONVER}
mkdir -p $HOME/{bin,tmp,lib/$PYTHON}
easy_install-${PYTHONVER} pip
pip2.7 install virtualenv --no-use-wheel
pip2.7 install --install-option="--user" virtualenvwrapper --no-use-wheel
# Update $HOME/.bashrc with appropriate environment variables
echo 'export PATH="$HOME/bin:$PATH"' >> $HOME/.bashrc
echo 'export TEMP="$HOME/tmp"' >> $HOME/.bashrc
echo "alias python=${PYTHON}" >> $HOME/.bashrc
echo "export PYTHON=${PYTHON}" >> $HOME/.bashrc
echo 'export WORKON_HOME="$HOME/.virtualenvs"' >> $HOME/.bashrc
echo 'export VIRTUALENVWRAPPER_TMPDIR="$WORKON_HOME/tmp"' >> $HOME/.bashrc
echo "export VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/$PYTHON" >> $HOME/.bashrc
echo 'source $HOME/bin/virtualenvwrapper.sh' >> $HOME/.bashrc
echo 'export PIP_VIRTUALENV_BASE=$WORKON_HOME' >> $HOME/.bashrc
echo 'export PIP_RESPECT_VIRTUALENV=true' >> $HOME/.bashrc
# load these changes
source $HOME/.bashrc
hash -r
@pyjavo
Copy link

pyjavo commented Mar 23, 2016

Thanks for posting it but it Didn't work for me :( :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment