- The contents of
postactivateandpredeactivatego into their respective placeholders in$WORKON_HOME - The
.envfile should be formatted as shown and placed in the top directory of your environment, e.g.
$WORKON_HOME/my_environment
Then after workon my_environment the new environment variables will be set,
and after deactivate the old ones will be restored.