Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have installed Python 2.7 but still kept Python 2.4. When I enter the command python, it runs python 2.4 and I want to keep it this way. But how to I set Django to use /usr/local/bin/python2.7 when it runs?

[EDIT] It is running on Apache with WSGI

share|improve this question
    
What web server are you running it in, and how is it configured? –  Shane Madden Dec 27 '11 at 4:04
    
Please work on your accept rate; accept answers that solve your problems. :) –  poplitea Dec 27 '11 at 9:48

1 Answer 1

Since you use WSGI, you should compile WSGI with a compile-flag to choose which python-version to use:

./configure --with-python=/usr/local/bin/python2.7

See here: http://code.google.com/p/modwsgi/wiki/InstallationIssues#Multiple_Python_Versions

share|improve this answer
    
Also make sure you reinstall any required packages using the new python version. –  Wichert Akkerman Dec 27 '11 at 15:34

Your Answer

 
discard

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.