osqa 上出现“导入中间件错误”

osqa 上出现“导入中间件错误”

我使用下面的教程在 ubuntu 14.0.4 上安装了 osqa 并以 postgresql 作为后端

http://wiki.osqa.net/display/docs/ubuntu+12.04,+django+1.3,+mod_wsgi,+virtual_env,+postgresql

它要求创建一个虚拟环境。我做了同样的事情,但得到了 500 服务器错误。因此,我在 settings_local.py 中设置了 debug = True,并在 apache 错误日志文件中得到了以下错误,显示 mod_wsgi 错误。

[Mon Nov 24 11:26:33.823663 2014] [:error] [pid 6389:tid 3034110784] [remote 192.168.227.129:15031] mod_wsgi (pid=6389): Exception occurred processing WSGI script '/srv/osqa.1/osqa/osqa.wsgi'.
[Mon Nov 24 11:26:33.823844 2014] [:error] [pid 6389:tid 3034110784] [remote 192.168.227.129:15031] Traceback (most recent call last):
[Mon Nov 24 11:26:33.823882 2014] [:error] [pid 6389:tid 3034110784] [remote 192.168.227.129:15031]   File "/srv/osqa.1/lib/python2.7/site-packages/Django-1.3-py2.7.egg/django/core/handlers/wsgi.py", line 250, in __call__
[Mon Nov 24 11:26:33.824027 2014] [:error] [pid 6389:tid 3034110784] [remote 192.168.227.129:15031]     self.load_middleware()
[Mon Nov 24 11:26:33.824059 2014] [:error] [pid 6389:tid 3034110784] [remote 192.168.227.129:15031]   File "/srv/osqa.1/lib/python2.7/site-packages/Django-1.3-py2.7.egg/django/core/handlers/base.py", line 47, in load_middleware
[Mon Nov 24 11:26:33.824184 2014] [:error] [pid 6389:tid 3034110784] [remote 192.168.227.129:15031]     raise exceptions.ImproperlyConfigured('Error importing middleware %s: "%s"' % (mw_module, e))
[Mon Nov 24 11:26:33.824216 2014] [:error] [pid 6389:tid 3034110784] [remote 192.168.227.129:15031] ImproperlyConfigured: Error importing middleware forum.middleware.extended_user: "cannot import name six"

我已经安装了 six 和所有其他依赖项。我浏览了 activate.py 文件并打印系统路径虚拟环境中的所有路径均按预期打印,并且还提到了六条路径。可能是什么原因?有人能帮帮我吗?

相关内容