[mod_python] ImportError: No module named mod_python.apache

Lex Berezhny LBerezhny at DevIS.com
Sun Dec 22 18:29:18 EST 2002


hello again,

  Thanks for the ./buildconf pointer, it is working great! (i have
attached an updated bash script to get others started, it's only been
tested on RH7, don't forget to su first ;-)

  The next phase of my mod_python escapade involved trying to get the
example working, that's when I hit my next snag.

  The following additions were made to httpd.conf:

    230 LoadModule python_module
/usr/local/apache2/modules/mod_python.so

    361 <Directory "/usr/local/apache2/htdocs/test">
    362     AddHandler python-program .py
    363     PythonHandler mptest
    364     PythonDebug On
    365 </Directory>


  I started apache as follows:

# ./apachectl -k start -DONE_PROCESS


  Going to http://localhost/test/mptest.py produced an Internal Server
Error with the following message in error_log:

[Sun Dec 22 17:57:55 2002] [error] make_obcallback: could not import
mod_python.apache.

ImportError: No module named mod_python.apache

  Is there any simple way to get mod_python to print out its sys.path?
What could cause an incorrect import path? Any suggestions on resolving
this?

thanks a lot,
 - lex
-------------- next part --------------
A non-text attachment was scrubbed...
Name: install.sh
Type: text/x-sh
Size: 563 bytes
Desc: not available
Url : http://mailman.modpython.org/pipermail/mod_python/attachments/20021222/3ba3579e/install-0003.bin


More information about the Mod_python mailing list