我在本教程后面有我的nginx和uwsgi设置:
http://panta.info/blog/3/how-to-install-and-configure-nginx-uwsgi-and-django-on-ubuntu.html
我收到以下错误:
Thu Sep 26 17:33:11 2013 - *** Operational MODE: preforking ***
Traceback (most recent call last):
File "/var/www/repo/mysite/mysite/mysite/wsgi.py", line 24, in <module>
from django.core.wsgi import get_wsgi_application
ImportError: No module named django.core.wsgi
但是当我这样做时,它有效:
Python 2.7.3 (default, Sep 26 2012, 21:51:14)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from django.core.wsgi import get_wsgi_application
>>> get_wsgi_application()
<django.core.handlers.wsgi.WSGIHandler object at 0x7f3b23281790>
>>>
还有别的东西我不见了?我一直试图调试这个问题,感谢任何帮助!
我也提到这个页面无济于事:
http://uwsgi-docs.readthedocs.org/en/latest/WSGIquickstart.html
答案 0 :(得分:1)
听起来像路径问题
你在uwsgi ini文件中的可以尝试添加
home=<abs path to your virtualenv>
所以,如果你完全遵循教程那将是
home=/home/USER/projects/venv