ramkrishanbhatt / modwsgi

Automatically exported from code.google.com/p/modwsgi
0 stars 0 forks source link

Support virtualenv on Windows #270

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The documentation says:

"Note: The WSGIPythonExecutable directive described here has been removed in 
mod_wsgi version 2.0. The WSGIPythonHome directive should be used instead."

and

"This [WSGIPythonHome]directive is not available on Windows systems. [...] This 
is because on Windows systems Python ignores the PYTHONHOME environment 
variable and always seems to use the location of the Python DLL for determining 
where the library files are located."

WSGIPythonExecutable is the only way to use a Python interpreter in a 
virtualenv on Windows, so it should be made available again.

Original issue reported on code.google.com by fwinter...@googlemail.com on 3 Sep 2012 at 11:30

GoogleCodeExporter commented 8 years ago
The documentation may simply be wrong/out of date. Did you actually try 
WSGIPythonHome?

Original comment by Graham.Dumpleton@gmail.com on 4 Sep 2012 at 1:26

GoogleCodeExporter commented 8 years ago
I did not try WSGIPythonHome, but found a workaround:

- When running Apache, set the PATH variable so that the correct Python 
interpreter is used

- In the .wsgi script, run activate_this.py as described here:
http://stackoverflow.com/questions/4614121/running-python-from-a-virtualenv-with
-apache-mod-wsgi-on-windows

This works for me, but only because I have control over how Apache is being 
started. I don't feel quite comfortable with this, so I will try 
WSGIPythonHome...

Original comment by fwinter...@googlemail.com on 4 Sep 2012 at 11:49

GoogleCodeExporter commented 8 years ago
Tried "WSGIPythonHome C:/Path/to/MyPythonVirtualEnv", works fine!

So it's only the documentation that is outdated. Thanks a lot!

Original comment by fwinter...@googlemail.com on 4 Sep 2012 at 12:09

GoogleCodeExporter commented 8 years ago
Closing out old issue.

Original comment by Graham.Dumpleton@gmail.com on 12 Nov 2014 at 10:18