python – 没有名为wsgi的模块

这就是我在Procfile中的内容:

web: gunicorn --pythonpath meraki meraki.wsgi

当我做工头开始时,我收到这个错误:

gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>

据我所知,在追溯中,原因是:

ImportError: No module named wsgi

我在shell中导入了wsgi,导入成功,没有错误.

为什么我不能开工头?

项目结构:

meraki
  meraki
      //other apps
      meraki
          settings
          __init__.py
          celery.py
          views.py
          wsgi.py
      manage.py
  Procfile
  requirements
  requirements.txt

最佳答案 你通过遵循一个不必要的复杂结构来迷惑自己.您不需要那个外部meraki目录,并且您的Procfile和requirements.txt应该与manage.py位于同一目录中.然后你可以删除pythonpath参数,一切都应该很好.

点赞