- The contents of
postactivate
andpredeactivate
go into their respective placeholders in$WORKON_HOME
- The
.env
file 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.