我一直在努力阅读有关这个问题的所有内容(并且在这样做时学到了很多东西).我能找到的最近的链接就在这里和这里.除了我在emperor模式下专门运行uwsgi之外,我的问题几乎完全相同.当我运行uswsgi服务而没有在emperor模式下运行时,我的django网站运行得很好.无论我如何更改配置,我总是收到错误消息my /tmp/uwsgi.log文件:"---找不到python应用程序,检查启动日志中的错误---"我已在下面列出了我的配置和错误日志:
操作系统版本:Linux raspberrypi 3.6.11+#538 armv6l GNU/Linux
Django版本:1.6.5
uwsgi版本:2.0.5.1
虚拟环境:/ var/www/testbed/env
项目位置:/ var/www/testbed/project/auth
项目树:
./auth/
|-- __init__.py
|-- __init__.pyc
|-- requirements.txt
|-- settings.py
|-- settings.pyc
|-- urls.py
|-- urls.pyc
|-- wsgi.py
`-- wsgi.pyc
Run Code Online (Sandbox Code Playgroud)
文件wsgi.py:
"""
WSGI config for auth project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/
"""
import os, sys, site
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "../../")))
sys.path.insert(1, os.path.abspath(os.path.join(os.path.dirname(__file__), "../")))
sys.path.append('/usr/lib/python2.7')
sys.path.append('/usr/lib/python2.7/dist-packages')
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "auth.settings")
from django.core.wsgi …Run Code Online (Sandbox Code Playgroud)