473,323 Members | 1,550 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,323 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 1966
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Rolfe | last post by:
Has anyone had success getting mod_python to run on Apache on Win2K? I'm writing up instructions on how to do this and need your help. When completed, the instructions at the mod_python website and...
1
by: Rolfe | last post by:
Hi, I struggled, and got mod_python running on Apache/Win2k. Follow these instructions verbatim and you shouldn't have any trouble. These instructions are based on...
2
by: Dan Gottlieb | last post by:
Hi, I realize that this is somewhat vague, but I'm not really sure what to do next. I'm trying to get Apache and mod_python set up on my windows XP box for testing purposes. I installed the...
1
by: wolf | last post by:
i would like to briefly share my experiences with installing mod_python on a w2000 box. i must say that i believe the installation process to be unnecessarily complicated by the simple fact that...
6
by: Piet | last post by:
Hi there, I cannot install mod_python v3.1.3 on either Win2k/ActivePython 2.3.2 or WinMe/Python 2.3.4. When I run the Windows installer, I get the following error message: Traceback (most recent...
0
by: tt | last post by:
My mod_python 3.1.4 installation works when Apache 2.0.54 is run in standalone mode (apache -k standalone) but refuses to operate when run as a service (apache -k restart). Logs yield the usual...
1
by: treelife | last post by:
I'm getting and internal server error when | run the following mod_python script. I am actually trying to run Django. Script: from mod_python import apache def handler(req):...
2
by: m.banaouas | last post by:
I installed Apache 2.2.3 and mod_python 3.2.10 on WinXP plateform I configured mod_python via httpd.conf: LoadModule python_module modules/mod_python.so but my script folder configuration...
1
by: arorap | last post by:
Hi, I recently setup mod_python successfully and things work smooth. However, I do not remember telling mod_python where to find Python installation. There's not environment variable which gives...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.