Closed GoogleCodeExporter closed 9 years ago
This error generally arises for the following reasons.
1. Python was not installed for all users of system, but was only installed for
the user that did the installation.
2. Apache, Python and mod_wsgi.so are not all 32 bit, or not all 64 bit. You
cannot mix 32 and 64 bit versions, must all be the same.
3. If mod_wsgi.so was a binary, it is not the correct binary for Python version
being used.
Original comment by Graham.Dumpleton@gmail.com
on 16 Oct 2012 at 11:02
Hi,
Thank you. I will cross check everything again and reply back.
Original comment by jigar.ti...@gmail.com
on 17 Oct 2012 at 4:03
Thanks a lot. That helped. Python should be installed for all users. Exactly,
python27.dll should be present in windows/system32. I get it now. Thanks.
Original comment by jigar.ti...@gmail.com
on 17 Oct 2012 at 6:04
Doing install for all will also set global registry settings rather than just
for user.
Original comment by Graham.Dumpleton@gmail.com
on 17 Oct 2012 at 6:23
Yes.
Just one short question, Can I tell mod_wsgi.so to find python27.dll on other
path other than windows/system32 ?
Or which registry does mod_wsgi read for python27.dll ?
Original comment by jigar.ti...@gmail.com
on 17 Oct 2012 at 6:26
My non existent knowledge of Windows does sort of recollect that if you can set
PATH of the Apache service to include the directory the DLL is in it will find
it. The registry entries as I remember aren't for DLL location, but more to do
with where the Python install directory is and Python module search path
defaults. I think this talks about them.
http://effbot.org/zone/python-register.htm
But that is for really really old Python versions and could be different now.
Original comment by Graham.Dumpleton@gmail.com
on 17 Oct 2012 at 6:40
Got it. I want to skip using registry and environment variables actually. So
the WSGI directive is best option to use here i guess. I added python27.dll in
c:\python and added the following lines in httpd.conf.
WSGIPythonHome "C:\python"
WSGIPythonPath "C:\python\Lib;C:\python\Lib\site-packages;C:\python\DLLs"
This worked. I hope what I am doing is right. Well, at least I can see mod_wsgi
loaded (shared) from "httpd.exe -D DUMP_MODULES" command. Please correct me if
I am doing anything wrong.
I tested by commenting the WSGIPythonHome Line. httpd couldn't start. After
removing the comment httpd again started. So I am assuming its right. :)
Original comment by jigar.ti...@gmail.com
on 17 Oct 2012 at 7:26
That it couldn't start was not likely because of DLL as those directives can't
replace how process finds DLL, so DLL must still be findable. Those settings
could probably be used to replace registry settings though.
Original comment by Graham.Dumpleton@gmail.com
on 17 Oct 2012 at 7:40
Sorry. I was totally wrong. Just copying the DLL with httpd.exe worked. :D
Original comment by jigar.ti...@gmail.com
on 17 Oct 2012 at 9:13
The same directory as httpd.exe is implicitly in PATH, so have it there and yes
it should be found.
Original comment by Graham.Dumpleton@gmail.com
on 17 Oct 2012 at 9:17
Thanks a lot for your help.
Original comment by jigar.ti...@gmail.com
on 17 Oct 2012 at 9:47
Closing out old issue where no further action was required.
Original comment by Graham.Dumpleton@gmail.com
on 12 Nov 2014 at 10:42
Original issue reported on code.google.com by
jigar.ti...@gmail.com
on 16 Oct 2012 at 12:06Attachments: