爲了讓mod_wsgi能夠在CentOS 5.4上運行,我已經在instructions here之後添加了python 2.6作爲可選庫。除了當試圖ping服務器Apache的日誌打印此錯誤的配置似乎罰款:CentOS:make python 2.6參見django
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 [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插件(MySQLdb,wadofstuff序列化器等) – Neil 2010-03-28 00:04:51