This script will automatically switch to a Python virtual environment after you cd
into a Python project, then deactivate when you leave. Inspired by a similar script from Justin Abrahms.
-
Install virtualenvwrapper.
-
Download the
auto_virtualenv.sh
script, and put it in your home directory (~/
). -
Run the following:
chmod a+x ~/auto_virtualenv.sh