在没有virtualenv的相当普通的FreeBSD系统上,我很难让uwsgi与Django一起工作。
试图运行会产生这个错误:
Traceback (most recent call last): File "./myapp/wsgi.py", line 3, in <module> from django.core.wsgi import get_wsgi_application ImportError: No module named django.core.wsgi unable to load app 0 (mountpoint='') (callable not found or import error)
myapp / wsgi.py不会从库存中修改。 我的ini文件:
[uwsgi] chdir = /usr/local/www module = myapp.wsgi:application master = true processes = 1 socket = /var/run/django.sock pidfile = /var/run/django.pid vacuum = true uid = www gid = www enable-threads = true
我的研究只显示了与我不使用的virtualenv有关的问题。 任何想法可能会发生什么? 从端口使用Python 3.4和最新的uwsgi。 from django.core.wsgi import get_wsgi_application运行在Python shell中from django.core.wsgi import get_wsgi_application不会产生任何错误。