[mod_python] MODPYTHON-225

Graham Dumpleton graham.dumpleton at gmail.com
Fri Sep 14 04:33:47 EDT 2007


On 14/09/2007, Porcari Giovanni <giovanni.porcari at gmail.com> wrote:
>
> Il giorno 14/set/07, alle ore 08:49, Graham Dumpleton ha scritto:
>
> > What do you get when run:
> >
> >   otool -L mod_python.so
>
>
> MacBookGP:/usr/local/apache2/modules gporcari$ otool -L mod_python.so
> mod_python.so:
>          /usr/lib/libSystem.B.dylib (compatibility version 1.0.0,
> current version 88.1.3)
>          /System/Library/Frameworks/Python.framework/Versions/2.3/
> Python (compatibility version 2.3.0, current version 2.3.5)

This means mod_python was never correctly compiled against Python 2.5
in the first place.

The basic issue is that your Python 2.5 doesn't appear to be installed
in standard Apple frameworks directory, but somewhere else, eg,
/usr/local. What this means is that you have to modify the mod_python
src/Makefile after having run configure, and modify LDFLAGS, inserting
at the start something like:

  -Wl,-F/some/path/lib

where /some/path/lib is where your Python 2.5 framework library is installed.

This way it will find the correct version of the framework library
when linking and therefore at runtime hopefully also find the correct
one.

If still problems after this change, post the actual compilation
output where it is linking the mod_python.so so can see what option
and path you added. Also show new output from running otool on result.

Graham

BTW, please use reply all some response goes back onto mailing list.

> > In the 'envvars' script file in the same directory as your httpd
> > binary, add:
> >
> >   PYTHONEXECUTABLE=/some/path/python
> >   export PYTHONEXECUTABLE
>
> i added:
>
>   PYTHONEXECUTABLE='/usr/local/bin/python'
>    export PYTHONEXECUTABLE
>
> >
> > where the path is to the Python 2.5 executable.
> >
> > Stop and then start (not restart) your Apache.
> >
> > Does that help?
> >
>
> still not working :(
>
> G.
>
>
>
> > Graham
> >
> > On 14/09/2007, Porcari Giovanni <giovanni.porcari at gmail.com> wrote:
> >> Hi All
> >>
> >> I am in the situation described here:
> >> https://issues.apache.org/jira/browse/MODPYTHON-225
> >>
> >> OSX 10.4.10 - apache 2.2.6 - modpython 3.3.1
> >> I installed python 2.5.1 using binary from python.org.
> >>
> >> the log file says:
> >>
> >> [Fri Sep 14 08:24:35 2007] [error] python_init: Python version
> >> mismatch, expected '2.5.1', found '2.3.5'.
> >> [Fri Sep 14 08:24:35 2007] [error] python_init: Python executable
> >> found '/usr/local/apache2/bin/httpd'.
> >> [Fri Sep 14 08:24:35 2007] [error] python_init: Python path being
> >> used '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
> >> python23.zip:/System/Library/Frameworks/Python.framework/Versions/
> >> 2.3/
> >> lib/python2.3/:/System/Library/Frameworks/Python.framework/Versions/
> >> 2.3/lib/python2.3/plat-darwin:/System/Library/Frameworks/
> >> Python.framework/Versions/2.3/lib/python2.3/plat-mac:/System/Library/
> >> Frameworks/Python.framework/Versions/2.3/lib/python2.3/plat-mac/lib-
> >> scriptpackages:/System/Library/Frameworks/Python.framework/Versions/
> >> 2.3/lib/python2.3/lib-tk:/System/Library/Frameworks/Python.framework/
> >> Versions/2.3/lib/python2.3/lib-dynload'.
> >> [Fri Sep 14 08:24:35 2007] [notice] mod_python: Creating 8 session
> >> mutexes based on 256 max processes and 0 max threads.
> >> [Fri Sep 14 08:24:35 2007] [notice] mod_python: using
> >> mutex_directory /tmp
> >> [Fri Sep 14 08:24:35 2007] [notice] Apache/2.2.6 (Unix) mod_python/
> >> 3.3.1 Python/2.3.5 configured -- resuming normal operations
> >>
> >> So it seems that modpython find python 2.3.5 instead of 2.5.1.
> >>
> >> After a lot of attempts and google search i'm giving up :(
> >>
> >> Can you help me ?
> >>
> >>
> >> Thank you
> >>
> >> G.Porcari
> >>
> >> _______________________________________________
> >> 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