开发者

Django running wrong version

Although running "python" from the shell runs Python v2.7, Django is loading files for python2.4, as shown in the error when I load a django site:

Mod_python error: "PythonHandler django.core.handlers.modpython"

Traceback (most recent call last):

File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line 287, in HandlerDispatch log=debug)

File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line 461, in import_module f, p, d = imp.find_module(parts[i], path)

ImportError: No module named django

I think Django is installed for version 2.7 and that's why the bottom says "No module named django"

This is my first django ins开发者_Go百科tall (it's on a mediatemple DV server) so I wouldn't be surprised if I'm doing something stupid. Thanks!


mod_python is built for 2.4, but Django is installed for 2.7. Either build mod_python for 2.7, install Django under 2.4, or put a local copy of Django with your project so that the version of Python doesn't matter.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜