Validate where Python library coming from using ldd. Seee section about Python shared library in:
http://code.google.com/p/modwsgi/wiki/CheckingYourInstallation What options did you use to 'configure' for your Python installation? Did you use the --enable-shared option? Graham On Tuesday, November 23, 2010, Guddu <[email protected]> wrote: > All, > > When accessing my Django App from Web Browser, the following messages > appear in the Apache Logs > > [Tue Nov 23 04:36:42 2010] [notice] Apache/2.2.17 (Unix) mod_wsgi/3.3 > Python/2.6.6 configured -- resuming normal operations > [Tue Nov 23 04:41:00 2010] [error] [client 108.10.0.191] mod_wsgi > (pid=942094): Target WSGI script '/u01/home/apli/wm/app/gdd/pyserver/ > apache/django.wsgi' cannot be loaded as Python module. > [Tue Nov 23 04:41:00 2010] [error] [client 108.10.0.191] mod_wsgi > (pid=942094): Exception occurred processing WSGI script '/u01/home/ > apli/wm/app/gdd/pyserver/apache/django.wsgi'. > [Tue Nov 23 04:41:00 2010] [error] [client 108.10.0.191] Traceback > (most recent call last): > [Tue Nov 23 04:41:00 2010] [error] [client 108.10.0.191] File "/u01/ > home/apli/wm/app/gdd/pyserver/apache/django.wsgi", line 19, in > <module> > [Tue Nov 23 04:41:00 2010] [error] [client 108.10.0.191] import > django.core.handlers.wsgi > [Tue Nov 23 04:41:00 2010] [error] [client 108.10.0.191] File "/usr/ > local/lib/python2.6/site-packages/django/core/handlers/wsgi.py", line > 1, in <module> > [Tue Nov 23 04:41:00 2010] [error] [client 108.10.0.191] from > threading import Lock > [Tue Nov 23 04:41:00 2010] [error] [client 108.10.0.191] File "/usr/ > local/lib/python2.6/threading.py", line 13, in <module> > [Tue Nov 23 04:41:00 2010] [error] [client 108.10.0.191] from > functools import wraps > [Tue Nov 23 04:41:00 2010] [error] [client 108.10.0.191] File "/usr/ > local/lib/python2.6/functools.py", line 10, in <module> > [Tue Nov 23 04:41:00 2010] [error] [client 108.10.0.191] from > _functools import partial, reduce > [Tue Nov 23 04:41:00 2010] [error] [client 108.10.0.191] ImportError: > rtld: 0712-001 Symbol PyArg_UnpackTuple was referenced > [Tue Nov 23 04:41:00 2010] [error] [client 108.10.0.191] from > module /usr/local/lib/python2.6/lib-dynload/_functools.so(), but a > runtime definition > [Tue Nov 23 04:41:00 2010] [error] [client 108.10.0.191] of the > symbol was not found. > [Tue Nov 23 04:41:00 2010] [error] [client 108.10.0.191] rtld: > 0712-001 Symbol PyCallable_Check was referenced > [Tue Nov 23 04:41:00 2010] [error] [client 108.10.0.191] from > module /usr/local/lib/python2.6/lib-dynload/_functools.so(), but a > runtime definition > [Tue Nov 23 04:41:00 2010] [error] [client 108.10.0.191] of the > symbol was not found. > [Tue Nov 23 04:41:00 2010] [error] [client 108.10.0.191] rtld: > 0712-001 Symbol PyDict_Copy was referenced > [Tue Nov 23 04:41:00 2010] [error] [client 108.10.0.191] from > module /usr/local/lib/python2.6/lib-dynload/_functools.so(), but a > runtime definition > [Tue Nov 23 04:41:00 2010] [error] [client 108.10.0.191] of the > symbol was not found. > [Tue Nov 23 04:41:00 2010] [error] [client 108.10.0.191] rtld: > 0712-001 Symbol PyDict_Merge was referenced > [Tue Nov 23 04:41:00 2010] [error] [client 108.10.0.191] from > module /usr/local/lib/python2.6/lib-dynload/_functools.so(), but a > runtime definition > [Tue Nov 23 04:41:00 2010] [error] [client 108.10.0.191] of the > symbol was not found. > [Tue Nov 23 04:41:00 2010] [error] [client 108.10.0.191] rtld: > 0712-001 Symbol PyDict_New was referenced > [Tue Nov 23 04:41:00 2010] [error] [client 108.10.0.191] from > module /usr/local/lib/python2.6/lib-dynload/_functools.so(), but a > runtime definition > [Tue Nov 23 04:41:00 2010] [error] [client 108.10.0.191] of the > symbol was not found. > [Tue Nov 23 04:41:00 2010] [error] [client 108.10.0.191] rtld: > 0712-001 Symbol PyErr_Occurred was referenced > [Tue Nov 23 04:41:00 2010] [error] [client 108.10.0.191] from > module /usr/local/lib/python2.6/lib-dynload/_functools.so(), but a > runtime definition > [Tue Nov 23 04:41:00 2010] [error] [client 108.10.0.191] of the > symbol was not found. > [Tue Nov 23 04:41:00 2010] [error] [client 108.10.0.191] rtld: > 0712-001 Symbol PyErr_SetString was referenced > [Tue Nov 23 04:41:00 2010] [error] [client 108.10.0.191] from > module /usr/local/lib/python2.6/lib-dynload/_functools.so(), but a > runtime definition > [Tue Nov 23 04:41:00 2010] [error] [client 108.10.0.191] of the > symbol was not found. > [Tue Nov 23 04:41:00 2010] [error] [client 108.10.0.191] \t0509-021 > Additional errors occurred but are not reported. > > When i start python shell and execute the same import statements as in > the logs above in the same order, I don't get those errors. > > root [zibal]% python > Python 2.6.6 (r266:84292, Nov 17 2010, 15:59:10) > [GCC 4.2.4] on aix5 > Type "help", "copyright", "credits" or "license" for more information. >>>> import django.core.handlers.wsgi >>>> from threading import Lock >>>> from functools import wraps >>>> from _functools import partial, reduce >>>> > > I don't have any mod_python module installed. The only module being > loaded via httpd.conf LoadModule directive is mod_wsgi > > Looking at the logs, the Python libraries being picked are from /usr/ > local/lib/python2.6 which is my correct and the only version of Python > on this machine. > > I have looked at these pages but could not find a solution > http://code.google.com/p/modwsgi/wiki/InstallationIssues > http://code.google.com/p/modwsgi/wiki/ConfigurationIssues > http://code.google.com/p/modwsgi/wiki/ApplicationIssues > > Please let me know if there is anything I could try to solve this > problem. > > Regards, > Anurag > > -- > 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. > > -- 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.
