Dear mod_wsgi community,
I'm trying to build mod_wsgi by linking to different custom build and
install python versions on a 64 bit linux FC 14 (without mod_python)
and using both mod_wsgi 3.3 and the latest mercurial checkout.
The builds compile and run successfully, but I am noticing some
strange behaviour - please let me know if this is expected! Without
any LD_LIBRARY_PATH or RPATH etc. environment variables set, and
configuring with
$ ./configure --with-python=/path/to/custom/bin/python && make && make
install
produces a mod_wsgi.so which ldd tells me is linked to system python,
not /path/to/custom:
$ ldd /etc/httpd/modules/mod_wsgi.so
linux-vdso.so.1 => (0x00007ffffebae000)
libpython2.7.so.1.0 => /usr/lib64/libpython2.7.so.1.0
(0x00007f9c5ac13000)
<snip>
When this module is loaded into apache, and I set WSGIPythonHome to /
path/to/custom wsgi/python tells me that I have the correct PYTHONPATH
libraries loaded (sys.path), but sys.executable is pointing to /usr/
bin/python (system python) and not /path/to/custom/bin/python
I find this quite confusing as I explicitly set --with-python= when
configuring. I can load both /usr/bin/python and /path/to/custom
python as they are both 2.7 - but I have a need for a python version
which isn't identical to system python - in this instance the
mod_wsgi.so refuses to load with
[Sun May 01 03:27:01 2011] [warn] mod_wsgi: Compiled for Python/2.7.1.
[Sun May 01 03:27:01 2011] [warn] mod_wsgi: Runtime using Python/2.7.
[Sun May 01 03:27:01 2011] [info] mod_wsgi (pid=24460): Python home /
opt/dev/base-py2.7.
[Sun May 01 03:27:01 2011] [info] mod_wsgi (pid=24460): Initializing
Python.
ImportError: No module named site
(which is expected as Compiled python 2.7.1 is not the same as Runtime
Python 2.7)
I have used patchelf to change the libraries that the shared library
is linking to, but wsgi is still invoking system python not custom
python.
I've read up on
http://code.google.com/p/modwsgi/wiki/InstallationIssues%23Multiple_Python_Versions
which was very helpful, but I can't seem to navigate around this
issue.
Can anyone spot anything obviously wrong with what I'm doing? Is there
a way to change Runtime python to avoid all this?
Thanks for reading this far,
Dan
--
You received this message because you are subscribed to the Google Groups
"modwsgi" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/modwsgi?hl=en.