Under
https://modwsgi.readthedocs.io/en/develop/user-guides/virtual-environments.html#daemon-mode-multiple-applications
https://modwsgi.readthedocs.io/en/develop/user-guides/virtual-environments.html
the code following
If the Python virtual environment is created using virtualenv or virtualenvwrapper, the WSGI script for each application should be modified to include code of the following form:
is for python2
python_home = '/usr/local/envs/myapp1'
activate_this = python_home + '/bin/activate_this.py'
execfile(activate_this, dict(file=activate_this))
for python3 it should be
python_home = '/usr/local/envs/myapp1'
activate_this = python_home + '/bin/activate_this.py'
exec(open(activate_this).read())
Under
https://modwsgi.readthedocs.io/en/develop/user-guides/virtual-environments.html#daemon-mode-multiple-applications
https://modwsgi.readthedocs.io/en/develop/user-guides/virtual-environments.html
the code following
If the Python virtual environment is created using virtualenv or virtualenvwrapper, the WSGI script for each application should be modified to include code of the following form:
is for python2
python_home = '/usr/local/envs/myapp1'
activate_this = python_home + '/bin/activate_this.py'
execfile(activate_this, dict(file=activate_this))
for python3 it should be
python_home = '/usr/local/envs/myapp1'
activate_this = python_home + '/bin/activate_this.py'
exec(open(activate_this).read())