472,119 Members | 934 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,119 software developers and data experts.

mod_python installation problem ..severity High

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

Nov 14 '06 #1
1 1892
boney wrote:
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/m...er/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

Nov 14 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Rolfe | last post: by
2 posts views Thread by Dan Gottlieb | last post: by
1 post views Thread by wolf | last post: by
1 post views Thread by treelife | last post: by
2 posts views Thread by m.banaouas | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.