Skip to content

Instantly share code, notes, and snippets.

@lightstrike
Created March 8, 2015 19:39
Show Gist options
  • Select an option

  • Save lightstrike/9f886a5dfdfd86badf88 to your computer and use it in GitHub Desktop.

Select an option

Save lightstrike/9f886a5dfdfd86badf88 to your computer and use it in GitHub Desktop.
Install Python virtualenvwrapper
#!/bin/bash
# installs virtualenvwrapper and adds initialization logic for .bashrc file
# change RC_FILE value as needed
RC_FILE=~/.bashrc
# global install of virtualenvwrapper
sudo pip install virtualenvwrapper
# creation of directory to store Python virtual environments
mkdir -p $HOME/.virtualenvs
# adding WORKON_HOME environment variable virtualenvwrapper uses for workon command
echo 'export WORKON_HOME=$HOME/.virtualenvs' >> $RC_FILE
# adding initialization script for virtualenvwrapper to run on shell start
echo 'source /usr/local/bin/virtualenvwrapper.sh' >> $RC_FILE
# rerun ~/.bashrc in current shell for virtualenvwrapper commands
source $RC_FILE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment