开发者

installed new version of python, but django still uses system default

On Dreamhost, I did the following

  • installed Python 2.7.1 in my ~/opt directory,
  • added export PATH=$HOME/opt/bin/:$PATH in my .bash_profile
  • verified with python --version that 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 django and django.VERSION in python shell
  • wget http://wiki.dreamhost.com/django-setup.py
  • python2.7 django-setup.py in 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜