[mod_python] make_obcallback: could not import mod_python.apache in testing

Graham Dumpleton graham.dumpleton at gmail.com
Mon Jun 18 00:50:01 EDT 2007


Your Python path would not appear to include the site-packages
directory. See prior posts referenced from:

  http://www.modpython.org/pipermail/mod_python/2006-October/022361.html

about registry keys that need to be checked and made to include
directory where mod_python Python package components were installed.
The version mismatch will not cause an issue on Windows as DLL used
for Python library.

BTW, which Python distribution are you using?

Graham

On 18/06/07, Jia Cheng <chengjialeph at gmail.com> wrote:
>
>
>
>
> Hi,
>
>
>
> After installing mod_python and configure it in Apache. I can't get through
> the test.
>
>
>
> My system:
>
>
>
> OS: Windows Vista Business.
>
> Mod_python 3.3.1
>
> Python 2.4.4
>
> Apache 2.0.59
>
>
>
> What I did so far:
>
> 1.      I downloaded win32-binary
> "mod_python-3.3.1.win32-py2.4-Apache2.0.exe" from download page
>
> 2.      Ran the installer as administrator. And the result seems right. It
> copied mod_python.so to apache folder too.
>
> 3.      I added these lines to Apache configuration file:
>
> -------------------------------------------------------------------------------
>
> LoadModule python_module modules/mod_python.so
>
>>
> # for testing
>
> <Directory "d:/web host/WebRoot/test">
>
>                 AddHandler mod_python .py
>
>         PythonHandler mptest
>
>         PythonDebug On
>
> </Directory>
>
> -------------------------------------------------------------------------------------
>
>
>
> But when I point to localhost/test/mptest.py, it gives Internal Server
> Error.
>
> From the error list, it shows: (from very beginning after server started)
>
> [Sun Jun 17 12:11:38 2007] [notice] Apache/2.0.59 (Win32) SVN/1.4.3 DAV/2
> configured -- resuming normal operations
>
> [Sun Jun 17 12:11:38 2007] [notice] Server built: Jul 27 2006 15:55:03
>
> [Sun Jun 17 12:11:38 2007] [notice] Parent: Created child process 3252
>
> [Sun Jun 17 12:11:38 2007] [error] python_init: Python version mismatch,
> expected '2.4.3', found '2.4.4'.
>
> [Sun Jun 17 12:11:39 2007] [error] python_init: Python executable found
> 'C:\\Program Files\\Apache
> Group\\Apache2\\bin\\Apache.exe'.
>
> [Sun Jun 17 12:11:39 2007] [error] python_init: Python path being used
> 'D:\\python24\\python24.zip;.\\DLLs;.\\lib;.\\lib\\plat-win;.\\lib\\lib-tk;C:\\Program
> Files\\Apache Group\\Apache2\\bin'.
>
> [Sun Jun 17 12:11:39 2007] [notice] mod_python: Creating 8 session mutexes
> based on 0 max processes and 250 max threads.
>
> [Sun Jun 17 12:11:41 2007] [notice] Child 3252: Child process is running
>
> [Sun Jun 17 12:11:41 2007] [notice] Child 3252: Acquired the start mutex.
>
> [Sun Jun 17 12:11:41 2007] [notice] Child 3252: Starting 250 worker threads.
>
> [Sun Jun 17 12:34:05 2007] [error] make_obcallback: could not import
> mod_python.apache.\n
>
> [Sun Jun 17 12:34:05 2007] [error] make_obcallback: Python path being used
> "['D:\\\\python24\\\\python24.zip', '.\\\\DLLs',
> '.\\\\lib', '.\\\\lib\\\\plat-win', '.\\\\lib\\\\lib-tk', 'C:\\\\Program
> Files\\\\Apache Group\\\\Apache2\\\\bin']".
>
> [Sun Jun 17 12:34:05 2007] [error] get_interpreter: no interpreter callback
> found.
>
> [Sun Jun 17 12:34:05 2007] [error] [client 165.123.138.0] python_handler:
> Can't get/create interpreter.
>
>
>
> I'm thinking maybe it's because of the python version mismatching (2.4.3,
> 2.4.4). If so, is there anyway I can get the mod_python for 2.4.4? Or maybe
> there're some conflicts between SVN and mod_python? Could any people help me
> out of this. Really appreciate!
>
>
>
> Thanks!
>
> Jia
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python
>
>



More information about the Mod_python mailing list