mod_python installation problem ..severity High

B

boney

hello All,

I am totally unknown to python language..

i need to install mod_python to embed python interpreter with the
Apache server, in order to use Trac with Apache Web Server

i am using :

Python 2.4.3,
apache 2.0.50 for windows,
mod_python-3.2.10.win32-py2.4-apache2.0 (windows installer)

after installing the packages i added the following lines to the
httpd.conf file :

LoadModule python_module modules/mod_python.so

in order to test mod_python installation i added to following line to
the httpd.conf file

<Directory "C:/Program Files/Apache Group/Apache2/htdocs/test">
AddHandler mod_python .py
PythonHandler mptest
PythonDebug On
</Directory>

within the htdocs/test folder there is mptest.py file with the
following contents

from mod_python import apache

def handler(req):
req.content_type = 'text/plain'
req.write("Hello World!")
return apache.OK


On doing this and duly following the installation and testing
instructions at www.modpython.org and then pointing the url as
http://localhost/test/mptest.py, i get the following error on the
server log file:

[Tue Nov 14 15:17:47 2006] [error] make_obcallback: could not import
mod_python.apache.\n
[Tue Nov 14 15:17:47 2006] [error] make_obcallback: Python path being
used "['C:\\\\Program Files\\\\Apache
Group\\\\Apache2\\\\bin\\\\python24.zip', '.\\\\DLLs', '.\\\\lib',
'.\\\\lib\\\\plat-win', '.\\\\lib\\\\lib-tk', 'C:\\\\Program
Files\\\\Apache Group\\\\Apache2\\\\bin']".
[Tue Nov 14 15:17:47 2006] [error] python_handler: no interpreter
callback found.
[Tue Nov 14 15:17:47 2006] [error] [client 127.0.0.1] python_handler:
Can't get/create interpreter.

On one of the forum i got the following feedback regarding this error:-

This one seems to occur on all platforms with similar frequency, and is
usually related
to having python multiple versions on the same system.The solution is
to adjust that PATH apache uses so it finds the correct python version.

But i donot have multiple versions of python installed.

Can anybody give some insight to what can be the problem and hw to
reach to the solution ??

Thanks in Advance

Boney
 
G

Graham Dumpleton

boney said:
On doing this and duly following the installation and testing
instructions at www.modpython.org and then pointing the url as
http://localhost/test/mptest.py, i get the following error on the
server log file:

[Tue Nov 14 15:17:47 2006] [error] make_obcallback: could not import
mod_python.apache.\n
[Tue Nov 14 15:17:47 2006] [error] make_obcallback: Python path being
used "['C:\\\\Program Files\\\\Apache
Group\\\\Apache2\\\\bin\\\\python24.zip', '.\\\\DLLs', '.\\\\lib',
'.\\\\lib\\\\plat-win', '.\\\\lib\\\\lib-tk', 'C:\\\\Program
Files\\\\Apache Group\\\\Apache2\\\\bin']".
[Tue Nov 14 15:17:47 2006] [error] python_handler: no interpreter
callback found.
[Tue Nov 14 15:17:47 2006] [error] [client 127.0.0.1] python_handler:
Can't get/create interpreter.

Your registry settings for Python do not include the site-packages
directory where mod_python typically gets installed. Thus, trying
updating the registry to add the site-packages directory. As a guide,
see the following post from the mod_python mailing list archive as a
guide.


http://www.modpython.org/pipermail/mod_python/2006-September/021979.html

This is for Python 2.5, but should give an indicator of what to look
for. Update the PythonPath entry.

For any mod_python help in the future, suggest you subscribe to the
mod_python mailing list and ask your question there as there is a
higher concentration of people there who are familiar with the
software. Details of the mod_python mailing list are on the mod_python
web site.

Graham
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,152
Members
46,697
Latest member
AugustNabo

Latest Threads

Top