Hi All, I've been playing around with this for days and getting nowhere.
I've got python2.4 installed via macports along with the standard Python2.3 and 2.5 installed in '/Library/Python/2.x'. I want to get mod_python working for the macports version of python(2.4) I've downloaded mod_python 3.1.1 and run the following commands (from another post on django-users) to build it and install it: $ cd /System/Library/Frameworks $ sudo mv Python.framework XXX_Python.framework $ cd <mod_python distribution directory> $ ./configure --with-apxs=/opt/local/apache2/bin/apxs --with-python=/ opt/local/bin/python2.4 --with-max-locks=32 $ make $ sudo make install $ cd /System/Library/Frameworks $ sudo mv XXX_Python.framework Python.framework I've followed these steps to stop mod_python building against the wrong version of python, yet in my apache error logs i get the following errors: [Wed Jan 14 16:14:50 2009] [notice] SIGHUP received. Attempting to restart [Wed Jan 14 16:14:51 2009] [error] python_init: Python version mismatch, expected '2.4.5', found '2.5.1'. [Wed Jan 14 16:14:51 2009] [error] python_init: Python executable found '/usr/bin/python'. [Wed Jan 14 16:14:51 2009] [error] python_init: Python path being used '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ python25.zip:/System/Library/Frameworks/Python.framework/Versions/2.5/ lib/python2.5/:/System/Library/Frameworks/Python.framework/Versions/ 2.5/lib/python2.5/plat-darwin:/System/Library/Frameworks/ Python.framework/Versions/2.5/lib/python2.5/plat-mac:/System/Library/ Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-mac/lib- scriptpackages:/System/Library/Frameworks/Python.framework/Versions/ 2.5/lib/python2.5/../../Extras/lib/python:/System/Library/Frameworks/ Python.framework/Versions/2.5/lib/python2.5/lib-tk:/System/Library/ Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload'. [Wed Jan 14 16:14:51 2009] [notice] mod_python: Creating 8 session mutexes based on 256 max processes and 0 max threads. [Wed Jan 14 16:14:51 2009] [notice] mod_python: using mutex_directory / tmp [Wed Jan 14 16:14:51 2009] [notice] Digest: generating secret for digest authentication ... [Wed Jan 14 16:14:51 2009] [notice] Digest: done [Wed Jan 14 16:14:51 2009] [notice] Apache/2.2.9 (Unix) mod_ssl/2.2.9 OpenSSL/0.9.7l DAV/2 PHP/5.2.6 mod_python/3.3.1 Python/2.5.1 configured -- resuming normal operations So mod_python is still referencing the wrong version of python(2.5), despite following the instructions to try and stop that happening. Also to double check that, i restarted apache whilst i had the python framework renamed (to XXX_Python.framework) and recieved the following error: Pete:~ Pete$ sudo apachectl restart httpd: Syntax error on line 116 of /opt/local/apache2/conf/httpd.conf: Cannot load /opt/local/apache2/modules/mod_python.so into server: dlopen(/opt/local/apache2/modules/mod_python.so, 10): Library not loaded: /System/Library/Frameworks/Python.framework/Versions/2.5/Python \n Referenced from: /opt/local/apache2/modules/mod_python.so\n Reason: image not found So by the looks of that it's saying the the mod_python.so is trying to reference Python2.5 so hasn't built properly (i.e to ref python2.4) ************** So does anyone have any ideas as to why mod_python won't build to the 2.4 version installed via macports, despite me configuring it to use that one. Sorry if the post is a bit of a mess i'm not that great at all this stuff. Any help would be greatly received, Pete. ************** P.s Other information that might be usefull: Python: Pete:~ Pete$ which python /opt/local/bin/python Apache: Pete:~ Pete$ which apachectl /opt/local/apache2/bin/apachectl mod_python: /opt/local/lib/python2.4/site-packages/mod_python Python path: Python 2.4.6 (#1, Jan 13 2009, 18:18:46) [GCC 4.0.1 (Apple Inc. build 5465)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> print sys.path ['', '/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/ python24.zip', '/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4', '/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/plat-darwin', '/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/plat-mac', '/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/plat-mac/lib-scriptpackages', '/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/lib-tk', '/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/lib-dynload', '/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages', '/opt/local/lib/python2.4/site-packages'] .bash_profile: export PATH="/opt/local/bin:/opt/local/apache2/bin:/opt/local/lib/ mysql5/bin:$PATH" alias mysqlstart='sudo /opt/local/bin/mysqld_safe5 &' alias mysqlstop='/opt/local/bin/mysqladmin5 -u root -p shutdown' --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---