I have a couple versions of python on my box. My app uses python 2.7 which is found in /usr/local/bin/python. Apache seems to be using an earlier version in /usr/bin/python.
You can't. Either rebuild mod_wsgi against the other version of Python, or change the shebang line in your CGI scripts to the other executable.
I could be mistaking, but whatever user apache is started with has a profile which likely has the search path in it. You could change the search path to search /usr/local/bin before /usr/bin, though this is not an ideal approach. Whatever default shell is set for the account used by Apache, just check that you have an rc-file for that shell, and if not, create one.
To use with Python 3, you need to install the right mod_wsgi for python 3.
On Debian or Ubuntu : sudo apt-get install libapache2-mod-wsgi-py3
.
For older versions of Python, when installing mod_wsgi, type : ./configure --with-python=/usr/local/bin/python2.5
for version 2.5 for instance.