[mod_python] error: could not import mod_python.apache

Lee Brown administrator at leebrown.org
Wed Apr 19 09:27:41 EDT 2006

I have a server box here that is configured almost identically to yours
(except it has Python 2.4.3 installed).  I just configured it as per the
tutorial and it ran mptest.py just fine.  I suspect this may be a windows
user/group/permission problem.
Open Task Manager and look at the running processes; note the user which
Apache.exe is running under.  Keep the task manager open and start a copy of
the Python interpreter and note the user which python.exe is running under.
(Usually, apache.exe is running as user SYSTEM and python.exe will be
running under the current user.)  
Go to the directory where you installed Python and right-click python.exe.
Under the security tab, verify that the user apache is running as has "full
control" permissions.

Best Regards,
Lee E. Brown
(administrator at leebrown.org)



From: mod_python-bounces at modpython.org
[mailto:mod_python-bounces at modpython.org] On Behalf Of e.deventer at boer.nl
Sent: Wednesday, April 19, 2006 6:55 AM
To: mod_python at modpython.org
Subject: [mod_python] error: could not import mod_python.apache

I can't get mod_python to work. 

I'm using the following software/versions, installed in the listed order: 

Windows 2000 5.00.2195 SP4 
Mozilla Firefox 
Python 2.4.2 (python-2.4.2.msi) 
Apache 2.0.55 (apache_2.0.55-win32-x86-no_ssl.exe) 
Mod_python 3.2.8 (mod_python-3.2.8.win32-py2.4.exe) 
Python and Apache (seem to) run just fine. 

After installation I have added the "LoadModule python_module
modules/mod_python.so" line to httpd.conf. mod_python.so is present in the
modules directory. Then I have tried to test my setup by following the test
procedure of the modpython.org tutorial (2.4). I've added this to the

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

(Does it matter where in the http.conf I put this code?) 

When I try to load mptest.py (containing the code form the tutorial), the
browser displays an Internal Server Error. Then when I look at the error.log
I see these errors: 
[error] make_obcallback: could not import mod_python.apache.\n 
[error] python_handler: no interpreter callback found. 
[error] [client] python_handler: Can't get/create interpreter.,
referer: http://localhost/test/ 

Then I tried to diagnose my configuration using the mod_python.testhandeler,
but this gives exactly the same error in both the browser and error.log 

Any ideas? 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20060419/99658d87/attachment-0001.html

More information about the Mod_python mailing list