The file http.conf contains only path for python modules. I mean a path to the executable file of python interpreter.
P.S. In my case, Python2.6 tried to use libraries for Python2.7 On Saturday, February 9, 2013 3:14:36 PM UTC+4, Pradeep Banavara wrote: > > Hi Alexander - Thanks. I did a similar workaround by specifying the python > path in the WSGIPythonHome directive in httpd.conf. Same principle though. > > -pradeep > > > On Sat, Feb 9, 2013 at 2:40 PM, Alexander Zaytsev > <[email protected]<javascript:> > > wrote: > >> Hi, >> >> I resolved a similar problem. In my case, the error was related with >> different python versions: 2.6 and 2.7. I replaced a first line >> "#!/usr/bin/env python" to "#!/usr/bin/env python2.7" in a base script (for >> you it is /var/www/webpy-app/borg/src/app.py). Possible, it will help you. >> >> четверг, 31 января 2013 г., 8:43:49 UTC+4 пользователь Pradeep Banavara >> написал: >> >>> I posted this on SO earlier but couldn't get any responses. Hoping that >>> you guys can perhaps help out. >>> >>> Environment : Pymongo + mod_wsgi + web.py + apache2 ( mod_wsgi in >>> embedded mode ). >>> >>> Exception : >>> >>> [Wed Jan 30 11:40:28 2013] [error] [client 111.93.158.52] mod_wsgi >>> (pid=27117): Target WSGI script '/var/www/webpy-app/borg/src/**app.py' >>> cannot be loaded as Python module.[Wed Jan 30 11:40:28 2013] [error] >>> [client 111.93.158.52] mod_wsgi (pid=27117): Exception occurred processing >>> WSGI script '/var/www/webpy-app/borg/src/**ap >>> p.py'.[Wed Jan 30 11:40:28 2013] [error] [client 111.93.158.52] Traceback >>> (most recent call last):[Wed Jan 30 11:40:28 2013] [error] [client >>> 111.93.158.52] File "/var/www/webpy-app/borg/src/**app.py", line 1, in >>> <module>[Wed Jan 30 11:40:28 2013] [error] [client 111.93.158.52] >>> import web,json,csv,pymongo,pdb,sys[Wed Jan 30 11:40:28 2013] [error] >>> [client 111.93.158.52] File >>> "/opt/python2.7/lib/python2.7/**site-packages/pymongo-2.4.1-**py2.7-linux-x86_64.egg/pymongo >>> /__init__.py", line 61, in <module>[Wed Jan 30 11:40:28 2013] [error] >>> [client 111.93.158.52] File >>> "/opt/python2.7/lib/python2.7/**site-packages/pymongo-2.4.1-**py2.7-linux-x86_64.egg/pymongo >>> /connection.py", line 39, in <module>[Wed Jan 30 11:40:28 2013] [error] >>> [client 111.93.158.52] File >>> "/opt/python2.7/lib/python2.7/**site-packages/pymongo-2.4.1-**py2.7-linux-x86_64.egg/pymongo >>> /mongo_client.py", line 44, in <module>[Wed Jan 30 11:40:28 2013] [error] >>> [client 111.93.158.52] File >>> "/opt/python2.7/lib/python2.7/**site-packages/pymongo-2.4.1-**py2.7-linux-x86_64.egg/bson/__ >>> init__.py", line 41, in <module>[Wed Jan 30 11:40:28 2013] [error] [client >>> 111.93.158.52] File >>> "/opt/python2.7/lib/python2.7/**site-packages/pymongo-2.4.1-**py2.7-linux-x86_64.egg/bson/_c >>> bson.py", line 7, in <module>[Wed Jan 30 11:40:28 2013] [error] [client >>> 111.93.158.52] File >>> "/opt/python2.7/lib/python2.7/**site-packages/pymongo-2.4.1-**py2.7-linux-x86_64.egg/bson/_c >>> bson.py", line 6, in __bootstrap__[Wed Jan 30 11:40:28 2013] [error] >>> [client 111.93.158.52] AttributeError: PyCapsule_Import >>> "datetime.datetime_CAPI" is not valid >>> >>> >>> I suspect this is some kind of library mismatch. mod_wsgi might be >>> looking at the python 2.6 libraries. Any clue how to fix the library path ? >>> here's my httpd.conf >>> >>> LoadModule wsgi_module modules/mod_wsgi.soWSGIScriptAlias /borg >>> /var/www/webpy-app/borg/src/ap**p.py/WSGIPythonPath >>> /opt/python2.7/lib/python2.7/s**ite-packages/Alias /borg/static >>> /var/www/webpy-app/borg/src/st**atic/AddType text/html .py >>> <Directory /var/www/webpy-app/> >>> Order deny,allow >>> Allow from all</Directory> >>> >>> Any help will be greatly appreciated. >>> >>> -- >> You received this message because you are subscribed to the Google Groups >> "web.py" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To post to this group, send email to [email protected] <javascript:> >> . >> Visit this group at http://groups.google.com/group/webpy?hl=en. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > > -- You received this message because you are subscribed to the Google Groups "web.py" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/webpy?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
