Organizing your Python environments¶
When your server is going to host several production sites, then it is likely that every project needs its own Python environment. This differs from what we said for a development machine in Set up a virtual Python environment.
You will then create a new environment for every project and store it
below the project directory. We recommend to always use the same
name, e.g. env
.
The env
directory¶
-
env
¶
By convention, on a production server hosting several projects, every
project directory has a subdirectory env
which contains the
Python environment used by that project.
Such a convention allows you for example to create an alias command
like the following in your .bash_aliases
file:
alias a='. env/bin/activate'
Also the bash script templates in bash are based on this convention.