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 http://toomuchdata.com/2012/06/25/how-to-install-python-2-7-3-on-centos-6-2/.

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.


  • 1
    Why use 2.7? Django 1.5 works with 2.6 too and you don't need to do all this extra work. Mar 28, 2013 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, 2013 at 9:34
  • 1
    What's outdated about it? RHEL/Centos provide updated 2.6 packages with bugfixes and security updates. Mar 28, 2013 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, 2013 at 9:50
  • 1
    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. Mar 28, 2013 at 10:12

1 Answer 1


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)

  • And if you go this route, I recommend uwsgi as daemon/container. I use nginx+uwsgi myself and it works beautifully. Mar 28, 2013 at 10:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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