[mod_python] troubles with installing

John Raines jrraines at comcast.net
Sun Feb 26 14:59:53 EST 2006


It had been a year since I'd installed mod_python and I seem to be  
having a huge problem getting the new version to work here on my Mac  
running  10.4.5.

I set out to upgrade to httpd-2.0.55 and 3.2.7 (now 3.2.8) a couple  
of weeks ago!

Apache seems to serve a plain HTML page OK. But when I move to call  
mod_python I get an error and that is reflected in the log below. If  
I start python outside of Apache and import mod_python.psp it finds  
psp but can't find _apache.

Here's what Apache's startup log says; if I were just a little  
smarter I'd probably know just what to do:

[Sun Feb 26 09:03:50 2006] [notice] mod_python: Creating 8 session  
mutexes based on 150 max processes and 0 max threads.
[Sun Feb 26 09:03:50 2006] [notice] Apache configured -- resuming  
normal operations
[Sun Feb 26 09:04:38 2006] [error] make_obcallback: could not import  
mod_python.apache.\n
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
'import site' failed; use -v for traceback
'import site' failed; use -v for traceback
ImportError: No module named mod_python.apache
[Sun Feb 26 09:04:38 2006] [error] python_handler: no interpreter  
callback found.
[Sun Feb 26 09:04:38 2006] [error] [client 127.0.0.1] python_handler:  
Can't get/create interpreter., referer: http://127.0.0.1/
'import site' failed; use -v for traceback
ImportError: No module named mod_python.apache

Do I need to use terminal to set $PYTHONHOME to /usr/bin/python2.3 or  
is this something I'd do in httpd.conf?
I tried doing it in terminal without any luck.

Here is the sequence of commands I used for installing :
sudo apachectl stop

cd ~/Desktop/httpd-2.0.55
./configure --enable-so --with-mpm=prefork
make
sudo make install

cd ~/Desktop/mod_python-3.2.8
./configure --with-apxs=/usr/local/apache2/bin/apxs --with-python=/ 
usr/bin/python2.3
make
sudo make install

sudo cp ~/Desktop/httpd.conf /usr/local/apache2/conf

sudo cp /usr/local/apache2/bin/apachectl /usr/sbin

sudo apachectl start

As you'd expect from the results running python outside apache, the  
site-packages directory deep in the Framework directory has the  
mod_python package and the modules directory in apache2 has the .so  
file. At one time (when running Panther), I did have multiple pythons  
installed on the hard drive where I've been trying to debug this  
procedure. I trashed them and installed Tiger early on in my efforts.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20060226/a415a871/attachment.html


More information about the Mod_python mailing list