I had a box with debian on it and python 2.6, I installed apache, mod_wsgi and configured everything and then realized by app is not compatible with python 2.6; so I installed python 2.7 from testing rep, updated-alternatives to make the new python the default one, installed django and apt-get installed libapache2-mid-wsgi and it seemed to install ok and restarted apache:
Unpacking libpython2.7 (from .../libpython2.7_2.7.2-8_i386.deb) ...
Preparing to replace libapache2-mod-wsgi 3.3-2 (using .../libapache2-mod-wsgi_3.3-4_i386.deb) ...
Unpacking replacement libapache2-mod-wsgi ...
Setting up libpython2.7 (2.7.2-8) ...
Setting up libapache2-mod-wsgi (3.3-4) ...
Restarting web server: apache2...
however, apache still uses the older version of python:
Exception Value:
invalid syntax (views.py, line 14)
Exception Location: /usr/local/lib/python2.6/dist-packages/django/utils/importlib.py in import_module, line 35
Python Executable: /usr/bin/python
Python Version: 2.6.6
Python Path:
['/usr/lib/python2.6',
'/usr/lib/python2.6/plat-linux2',
'/usr/lib/python2.6/lib-tk',
'/usr/lib/python2.6/lib-old',
'/usr/lib/python2.6/lib-dynload',
'/usr/local/lib/python2.6/dist-packages',
'/usr/lib/python2.6/dist-packages',
'/usr/lib/pymodules/python2.6',
'/home',
'/home/portman']
what is it that I need to do to help mod_wsgi see the proper version of python?
Simple, needed to configure wsgi.load in mods-enabled to point to the right .so file