Apache showing “Python version mismatch” with mod_wsgi-Collection of common programming errors

I am trying to get web.py working.

I have compiled mod_wsgi to use python2.6, and configured my virtualhost correctly (at least I am pretty sure it is!). The hello, world application keeps showing up as 404. I changed the loglevel of Apache to info. and am seeing the following:

[Wed Sep 28 15:41:12 2011] [info] mod_wsgi (pid=25969): Attach interpreter ''.
[Wed Sep 28 15:42:55 2011] [info] mod_wsgi (pid=25969): Create interpreter 'clearpoint.turnleftllc.com|/budgetcalculator'.
[Wed Sep 28 15:45:33 2011] [info] mod_wsgi (pid=25969): Destroying interpreters.
[Wed Sep 28 15:45:33 2011] [info] mod_wsgi (pid=25969): Destroy interpreter 'clearpoint.turnleftllc.com|/budgetcalculator'.
[Wed Sep 28 15:45:33 2011] [info] mod_wsgi (pid=25969): Cleanup interpreter ''.
[Wed Sep 28 15:45:33 2011] [info] mod_wsgi (pid=25969): Terminating Python.
[Wed Sep 28 15:45:33 2011] [error] Exception KeyError: KeyError(-1216178416,) in  ignored
[Wed Sep 28 15:45:33 2011] [info] mod_wsgi (pid=25969): Python has shutdown.
Fatal Python error: Interpreter not initialized (version mismatch?)

Regarding the KeyError, I am really not sure where that is coming from. I tested the application from the command line (python26 code.py) and it executes without error. It gives no output whatsoever in fact.

Just in case, here is my VirtualHost configuration, as well as the application code:

Python Code (taken directly from the web.py site):

#!/usr/bin/python26
import web

urls = (
        '/.*', 'index'
        )

class index:
    def GET(self):
        return "Hello, world!"


app = web.application(urls,globals()).wsgifunc()

VirtualHost:


        ServerAdmin "[email protected]"
        ServerName clearpoint.turnleftllc.com
        ServerAlias clearpoint
        ErrorLog logs/clearpoint_error_log

        DocumentRoot /home/turnleftllc/public_html/cpccs
        WSGIScriptAlias /budgetCalculator /home/turnleftllc/public_html/cpccs/apps/code.py
        Alias /budgetCalculator/static /home/turnleftllc/public_html/cpccs/apps/static
        AddType text/html .py
        
                Order allow,deny
                Allow from all
                AllowOverride All
        
        
                Order allow,deny
                Allow from all
        

I am using CentOS5, which defaults to python2.4. I did uninstall and recompile mod_wsgi for python2.6 (as you can see in the output, it’s definitely initializing 2.6).

Any help would be greatly appreciated!