On Dreamhost, I did the following
- installed Python 2.7.1 in my ~/opt directory,
- added
export PATH=$HOME/opt/bin/:$PATHin my .bash_profile - verified with
python --versionthat 2.7.1 was default - installed setuptools 0.6c11-py2.7
- installed Django 1.2.4 with
/path/to/python2.7 setup.py install - verified version 1.2.4 with
import djangoanddjango.VERSIONin python shell wget http://wiki.dreamhost.com/django-setup.pypython2.7 django-setup.pyin my site directory ("site.com")- intentionally put a syntax error in ~/site.com/project/urls.py
- visited the site in web browser and the error page still says I'm using Python 2.5.2
Why does my Django refuse to use my new version of Python?
According to this, installing-django-with-python-2-5-an开发者_如何转开发d-not-with-the-default-version-of-python, the problem might be with mod_wsgi (or I think passenger in my case (but I don't actually know if they do the same thing)).
Should I try to compile mod_wsgi, compile passenger_wsgi, install virtualenv, all of the above, none of the above, A and C, B D and E, or something else altogether?
Maybe you can change the WSGIPythonExecutable directive in your mod_wsgi configuration?
To configure Passenger's Python interpretter, you can follow these steps.
加载中,请稍侯......
精彩评论