Apache mod_wsgi and python 2.7
My WSGI installation uses python2.6 and my django project requires python 2.7 to work properly. Is is possible to relink the python ver开发者_如何转开发sion WSGI uses without recompiling wsgi? I've been having some odd errors trying to compile wsgi and I'd prefer to sidestep that whole troubleshooting process if possible.
Thanks
To answer the specific question, no it is not possible to make a mod_wsgi installation compiled for one Python version to use a different version at run time.
Why don't you create a separate question for the actual problem you are having with compiling from source code. Better still ask it on the mod_wsgi mailing list where best people to help you can be found.
You'll have to re-install WSGI with something like this directive
./configure --with-python=/usr/local/bin/python2.7
http://code.google.com/p/modwsgi/wiki/InstallationIssues#Multiple_Python_Versions
If you're running multiple applications, it might be a good idea to use virtualenv and set the os.environ variables in your applications' WSGI scripts to point to their virtual environments.
精彩评论