[mod_python] With OS X and Python 2.4 - installed but not working

Ron Reisor ron at udel.edu
Thu Dec 23 09:33:11 EST 2004


Jason,

    Check that the mod_python-3.1.3 configure script found the python 
executable you want.  Here's part of what configure prints for me as it 
runs:

checking for --with-python... no
checking for python... /usr/local/bin/python
checking Python version... 2.4
checking Python install prefix... /Library/Frameworks/Python.framework/Versions/2.4
checking what libraries Python was linked with... -framework  Python    -ldl 
checking linker flags used to link Python... 
checking where Python include files are... -I/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4

    Make sure the mod_python.so apache module is linked to the python 
framework you intend:

[zim:~] ron% otool -L /usr/local/modules/mod_python.so
/usr/local/modules/mod_python.so:
         /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current 
version 71.1.1)
         /Library/Frameworks/Python.framework/Versions/2.4/Python 
(compatibility version 2.4.0, current version 2.4.0)


    Notice I just build python2.4 using --enable-framework and it builds in 
/Library/Frameworks instead of /System/Frameworks and puts the python 
executable in /usr/local/bin instead of /usr/bin.  That's out of the way 
enough for me, and lots of things build to /usr/local/bin without too much 
work.

cheers,

Ron


On Wed, 22 Dec 2004, Jason Stitt wrote:

> I am trying to get fresh source builds of Apache 2.0.52, Python 2.4 and Mod 
> Python 3.1.3 -- that is, all the latest stable versions -- working on my Mac 
> (OS X 10.3.7). I'm putting them in a separate directory ~/server (so as not 
> to mess around with the factory-default installations). It's not quite 
> working.
>
> Apache went in fine. I tried to install Python normally, but it refused to 
> create a libpython for me (which mod_python said it needed), even with the 
> --enable-shared configuration flag. So I made it a framework under 
> ~/server/frameworks. In both cases, the python interpreter itself worked 
> fine.
>
> Then came mod_python. Once I did the framework install of python, it compiled 
> OK. I gave it a --with-python flag pointing at the executable in my framework 
> install. I have added the LoadModule to my config file, which looks like 
> this:
>
> LoadModule python_module /Users/jason/server/apache2/modules/mod_python.so
> <Directory /Users/jason/server/apache2/htdocs>
>        AddHandler mod_python .py
>        PythonHandler mod_python.publisher
>        PythonDebug On
> </Directory>
>
> The server string reads:
> Apache/2.0.52 (Unix) mod_python/3.1.3 Python/2.3 Server at localhost Port 
> 8000
>
> Note the odd inclusion of Python/2.3. I checked mod_python's makefile and it 
> references only my shiny new python 2.4 directory.
>
> Anyway, whenever I try to actually visit a python page, it either hangs/times 
> out, or gives me a 500 internal server error. Nothing is written to the 
> error_log.
>
> Anyone experienced with this type of build on OS X? Any ideas?
>
> Thanks much,
> Jason
>
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python
>

Ron Reisor <ron at udel.edu> (RWR3)
University of Delaware Information Technologies/Network and Systems Services
Computing Center/192 South Chapel Street/Newark DE, 19716
pgp finger print: 0D 73 06 6F D3 6A 99 D3  F5 D5 6E FF 3B B9 7C 2C


More information about the Mod_python mailing list