Skip to content

Instantly share code, notes, and snippets.

@yoniLavi
Last active August 14, 2017 17:14
Show Gist options
  • Select an option

  • Save yoniLavi/ef91278dc265723291e7284165291c84 to your computer and use it in GitHub Desktop.

Select an option

Save yoniLavi/ef91278dc265723291e7284165291c84 to your computer and use it in GitHub Desktop.
Set Python 3 as the default and enable virtualenvwrapper
set -e # we exit on error, but otherwise all the commands are quiet
sudo pip -q install virtualenvwrapper
grep -q 'VIRTUALENV_PYTHON' ~/.bashrc || (echo 'export VIRTUALENV_PYTHON=/usr/bin/python3' >>~/.bashrc)
grep -q 'virtualenvwrapper.sh' ~/.bashrc || (echo 'source /usr/local/bin/virtualenvwrapper.sh' >>~/.bashrc)
grep -q 'Welcome to your Code Institute' ~/.bashrc || (echo 'echo "Hi $C9_USER, welcome to your Code Institute Python workspace in c9, remember to use the mkvirtualenv and workon commands for your projects"' >>~/.bashrc)
source ~/.bashrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment