[mod_python] python_init errors

Graham Dumpleton graham.dumpleton at gmail.com
Sat Mar 14 01:22:28 EDT 2009


2009/3/14 Jim McDonald <jimmcd at ns.sympatico.ca>:
> Ever since I installed mod_python (3.3), Apache 2.2 launches with these
> error messages:
>
> 1. [date-time] [error] python_init: Python version mismatch, expected '2.5',
> found '2.5.2'.

Ignore it:

  http://issues.apache.org/jira/browse/MODPYTHON-205

On Windows it is of no significance. Even on UNIX it doesn't matter
unless your Python installation didn't provide a shared library or
mod_python wasn't using the shared library.

> 2. [date-time] [error] python_init: Python executable found 'C:\\Program
> Files\\Apache Software Foundation\\Apache2.2\\bin\\httpd.exe'.
>
> 3. [date-time] [error] python_init: Python path being used
> 'C:\\WINDOWS\\system32\\python25.zip;D:\\Program
> Files\\Python\\Lib;D:\\Program Files\\Python\\DLLs;D:\\Program
> Files\\Python\\Lib\\lib-tk;;C:\\Program Files\\Apache Software
> Foundation\\Apache2.2\\bin'.

These aren't errors and are just information messages to help in case
1 did mean something, but it doesn't actually.

The one about executable location was always misleading and should
have just been dropped, as always shows location of Apache server
executable and not Python.

> When I follow the documented set-up instructions and test the system with
> mptest.py as the handler, my system passes the test, but I can't get any joy
> from mod_python.publisher, at all.
>
> I've seen many posts on many sites about the first error message, but I
> haven't seen any informative reply to those posts. I don't even know if the
> problem is significant.
>
> And I'm still struggling to achieve basic functionality in mod_python, so I
> wonder if this message is pointing at the problem.
>
> As for the second, it makes no sense to me. Is it saying that it thinks
> httpd.exe is python? Or what? I'd really like to know what this error is.
>
> And the third is even less intelligible. I'm unable to find a file called
> 'python25.zip' anywhere on my system, and there certainly isn't one in
> "C:\WINDOWS\system32\". Where in the world did Apache get the idea that I
> want that in my python path? And what is the function of the python path,
> anyway?

If you do not know what PYTHONPATH or sys.path in Python are about
then go read the Python documentation.

The python25.zip is in there as it is one of the standard things that
Python on a Windows box looks for. Keep in mind that Python is
actually being run albeit embedded in Apache. Thus, don't think it is
Apache doing these things, it is actually Python.

> It looks to me as if python_init (whatever that is--I presume it's some
> piece of mod_python to which I have no direct access) is messed up. But how
> did it get that way? Is this the work of the post-install configuration
> business? Is it something I can fix in httpd.conf?
>
> I'm presuming that there are masses of happy mod_python users out there who
> are using Apache 2.2 and the usual LAMP or WAMP stack. But I think (judging
> from the forlorn cries I hear all over the web) I'm speaking for a pretty
> sizable population of frustrated would-be users who can't get past the the
> initial set-up problems.
>
> If any of you blessed many could spare a few moments for us wretched few,
> we'd all be deeply grateful.

None of those messages are important and can be completely ignored.

Since you don't actually say what the problem is when running
mod_python.publisher, can't help you there.

Graham


More information about the Mod_python mailing list