How to switch to different python version on apache mod_wsgi

By default the ubuntu-debian package of libapache-mod-wsgi contains the wsgi apache module compiled for either python 2.6 and python 2.7. This makes really easy to switch between python 2.6 or python 2.7 support in webapps. Indeed you have just to change a symbolic link to make your application working with python 2.7 interpreter if python 2.6 is enabled by default.
As you can see the libapacke2-mod-wsgi package countains both the 2.6 and 2.7 version of the the modules.
Se let's see how to accomplish this:
vincenzo@mba:/usr/lib/apache2/modules$ ls
vincenzo@mba:/usr/lib/apache2/modules$ file
mod_wsgi http://tabs...viagra/.so: symbolic link to `'
vincenzo@mba:/usr/lib/apache2/modules$ sudo ln -fs
Finished: we created file which is a symbolic link to Now your reboot apache with sudo apache2ctl restart and you are using python 2.7 ;)
how to solve pymongo.errors.AutoReconnect: could not find master/primary
Ubuntu 11.04 clipboard with unity support

Leave a Reply

%d bloggers like this: