Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We currently have a server running python2.6 + apache and mod_wsgi that runs with Django 1.3.

I plan to use the following guide to install python 2.7

Then use pip to install the packages for 2.7 which I believe using pip install after installing python2.7 will handle this.

After this I think recompiling mod_wsgi with it pointing to the python2.7 path should handle making Apache2 load the correct version of python for the site.

I was just wondering if I have missed something or whether this process is completely wrong and shouldn't be used.


share|improve this question
Why use 2.7? Django 1.5 works with 2.6 too and you don't need to do all this extra work. – Dennis Kaarsemaker Mar 28 '13 at 0:53
The 2.6 version currently in use is an outdated version of 2.6 so my thinking is along the lines of if I should upgrade the python version I might as well jump to 2.7.3 – Jeff_Hd Mar 28 '13 at 9:34
What's outdated about it? RHEL/Centos provide updated 2.6 packages with bugfixes and security updates. – Dennis Kaarsemaker Mar 28 '13 at 9:36
Well it was manually compiled by the people who set it up originally and is python 2.6.2 - being manually compiled I assume it isn't easy at all to upgrade. I should note the CentOS version is 5.7 – Jeff_Hd Mar 28 '13 at 9:50
Ah, centos 5. That ships with an ancient python. To be honest, I think it'll be faster to reinstall with centos 6 (comes with python 2.6) than to compile your own python. – Dennis Kaarsemaker Mar 28 '13 at 10:12
up vote 0 down vote accepted

So, for an actual answer to your question: If you use mod_wsgi in embedded mode, you will need to recompile it. But I'd suggest running it in daemon mode, so you don't have to recompile mod_wsgi (or restart apache whenever you app changes, just the wsgi daemon)

share|improve this answer
And if you go this route, I recommend uwsgi as daemon/container. I use nginx+uwsgi myself and it works beautifully. – Dennis Kaarsemaker Mar 28 '13 at 10:48
Thanks! I'll look into this. – Jeff_Hd Mar 28 '13 at 10:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.