没有名为django.conf的模块

时间:2017-08-31 09:37:06

标签: python django gunicorn django-wsgi

我正在尝试使用此命令在我的服务器上重启django进程:

gunicorn projectname.wsgi

但是,我一直收到这个错误:

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/gunicorn/arbiter.py", line 515, in spawn_worker
    worker.init_process()
  File "/usr/lib/python2.7/dist-packages/gunicorn/workers/base.py", line 122, in init_process
    self.load_wsgi()
  File "/usr/lib/python2.7/dist-packages/gunicorn/workers/base.py", line 130, in load_wsgi
    self.wsgi = self.app.wsgi()
  File "/usr/lib/python2.7/dist-packages/gunicorn/app/base.py", line 67, in wsgi
    self.callable = self.load()
  File "/usr/lib/python2.7/dist-packages/gunicorn/app/wsgiapp.py", line 65, in load
    return self.load_wsgiapp()
  File "/usr/lib/python2.7/dist-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
    return util.import_app(self.app_uri)
  File "/usr/lib/python2.7/dist-packages/gunicorn/util.py", line 366, in import_app
    __import__(module)
  File "/root/xxxx/xxxxxxx/xxxx/wsgi.py", line 11, in <module>
    from whitenoise.django import DjangoWhiteNoise
  File "/usr/local/lib/python2.7/dist-packages/whitenoise/django.py", line 5, in <module>
    from django.conf import settings
ImportError: No module named django.conf

任何想法从哪里去?

0 个答案:

没有答案