使Python 2.6 Django的看

问题描述 投票:1回答:2

在一个悲惨的企图得到的mod_wsgi到在CentOS 5.4上运行,我已经添加的Python 2.6的instructions here以下可选库。尝试ping服务器Apache日志打印此错误时的配置似乎除了罚款:

mod_wsgi (pid=20033, process='otalo', application='127.0.0.1|'): Loading WSGI script '...django.wsgi'. 
[Sat Mar 27 16:11:45 2010] [error] [client 171.66.52.218] mod_wsgi (pid=20033): Target WSGI script '...django.wsgi' cannot be loaded as Python module. 
[Sat Mar 27 16:11:45 2010] [error] [client 171.66.52.218] mod_wsgi (pid=20033): Exception occurred processing WSGI script '...django.wsgi'. 
[Sat Mar 27 16:11:45 2010] [error] [client 171.66.52.218] Traceback (most recent call last): 
[Sat Mar 27 16:11:45 2010] [error] [client 171.66.52.218]   File "...django.wsgi", line 8, in <module> 
[Sat Mar 27 16:11:45 2010] [error] [client 171.66.52.218]     import django.core.handlers.wsgi 
[Sat Mar 27 16:11:45 2010] [error] [client 171.66.52.218] ImportError: No module named django.core.handlers.wsgi

当我去我的python2.6的安装的命令行,并尝试'进口Django的,该模块没有找到(导入错误)。然而,我的默认的Python 2.4的安装(仍然工作正常)能够成功导入。我怎么一点的Python 2.6 Django的?

python django centos mod-wsgi
2个回答
0
投票

您需要使用/为的意思使用它的Python版本专门安装Django - 安装了2.4和2.6的总是要分开(他们必须要 - !有二进制和字节码的格式不兼容)。我不知道如果有可能的CentOS提供什么,因为这 - 我会得到Django的sources从源代码安装(其归结为:下载,焦油,CD,最后一个简单的sudo python2.6 setup.py install - 不过还是其他你运行2.6安装Python的)。作为一个更好的开发人员比我是一个系统管理员,我总有一种偏见青睐来源的东西,真的在我在做什么(尤其是Python版本和扩展)核心安装的。


0
投票

我创造了我越来越Django的经验在Redhat和和CentOS工作写了link text。我升级,我是使用python的版本,并开始与的init.d脚本。

© www.soinside.com 2019 - 2024. All rights reserved.