I seem to keep going around in circles :(. I have to use MacPython 2.6 so that MySQLdb will compile properly. But I can't seem to create a workable mod_wsgi with a Python updated from the system version.
The wiki implies that that MacPython will peacefully co-exist with the System Python, which is not true. The Apple Python is stored in / System/Library/Frameworks and the python.org installer puts the upgraded Python (2.6) in /Library/Frameworks/. The wiki also states the using the WSGI directive to set the Python Home cannot span a major version number. So, I built mod_wsgi with the updated Python. I inspected the Makefile and it appears to have been built properly (according to the wiki). To "avoid" the Python mismatch error, I tried to set the PythonHome with the results as listed in the previous post (the PyExc_Runtime error). I tried another approach as suggested in the wiki to set the ENVVARS. I set the PATH to the bin directory of the updated Python (as stated above). When I install and then restart Apache, I get the following error: httpd: Syntax error on line 164 of /private/etc/apache2/httpd.conf: Cannot load /usr/libexec/apache2/mod_wsgi.so into server: dlopen(/usr/ libexec/apache2/mod_wsgi.so, 10): Symbol not found: _PyExc_RuntimeError \n Referenced from: /usr/libexec/apache2/mod_wsgi.so\n Expected in: dynamic lookup\n On Feb 7, 10:41 pm, Michael Bartz <[email protected]> wrote: > I re-read the documents on different Python versions and rebuilt > mod_wsgi with the configure directive to point to the system version > not the updated version. > > I was able to get the test application to display. > > BUT, does this mean that my Django applications will use the system > Python (2.5.1) or the updated one (2.6.6)? > > Also, FYI, I tried setting the WSGIPythonHome directive and I got > errors "PyExecRuntime not found" > > On Feb 7, 12:14 pm, Michael Bartz <[email protected]> wrote: > > > > > I am trying to install Django on a Leopard Mac OS X Server and keep > > stumbling on several seemingly common pitfalls. > > > The most recent is the "Python version mismatch" problem. In order to > > clear up the 32-bit, 64-bit MySQL issue with MySQL and MySQLdb, I > > installed MacPython 2.6.6 from python.org. > > > I was able to successfully install and use MySQL and Django in > > development mode. > > > I am stuck on installing WSGI. I have built mod_wsgi-3.3 with the -- > > disable-frameworks and the --with-python directive pointing to the / > > Library version of in the updated Python. > > > When I try to start Apache, Apache core dumps and the error log has > > the following: > > > [Mon Feb 07 12:01:31 2011] [error] python_init: Python version > > mismatch, expected '2.6.6', found '2.5.1'. > > [Mon Feb 07 12:01:31 2011] [error] python_init: Python executable > > found '/usr/bin/python'. > > [Mon Feb 07 12:01:31 2011] [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'. > > > I am left puzzled about where the PYTHONPATH is being set. I have > > toyed with the idea of setting the symbolic link in /usr/bin/python to > > the correct one, but I am sure that would cause untold havoc. > > > Can someone give me a pointer in the right direction? > > > Thanks. -- You received this message because you are subscribed to the Google Groups "modwsgi" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en.
