Skip to content
Myr

Mention virtualenv in mod_wsgi deployment docs

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parent 881aa3a · Browse files · 1 file+16 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+16 added−0 removed

  • other:+16 added−0 removed

1 file+16 added−0 removed

modified:docs/deploying/mod_wsgi.rst+16 added
131 unmodified lines
132133 The reason for this is that for non-installed packages, the module134 filename is used to locate the resources and for symlinks the wrong135 filename is picked up.136137Working with Virtual Environments138---------------------------------139140Virtual environments have the advantage that they never install the141required dependencies system wide so you have a better control over what142is used where. If you want to use a virtual environment with mod_wsgi you143have to modify your `.wsgi` file slightly.144145Add the following lines to the top of your `.wsgi` file::146147 activate_this = '/path/to/env/bin/activate_this.py'148 execfile(activate_this, dict(__file__=activate_this))149150This sets up the load paths according to the settings of the virtual151environment. Keep in mind that the path has to be absolute.