Heroku ModuleNotFoundError:在其中没有名为“ django”的模块

时间:2019-01-20 13:21:08

标签: python-3.x heroku gunicorn

我正在heroku上部署我的应用程序,但是当我运行它时,它显示了一个错误, Moduleerror,这是错误:

Starting process with command `gunicorn pages_project.wsgi --log-file -`
2019-01-20T10:42:47.543030+00:00 heroku[web.1]: State changed from starting to crashed
2019-01-20T10:42:47.526559+00:00 heroku[web.1]: Process exited with status 3
2019-01-20T10:42:53.998863+00:00 heroku[web.1]: State changed from starting to crashed
2019-01-20T10:42:53.818868+00:00 app[web.1]: [2019-01-20 10:42:53 +0000] [4] [INFO] Starting gunicorn 19.9.0
2019-01-20T10:42:53.819711+00:00 app[web.1]: [2019-01-20 10:42:53 +0000] [4] [INFO] Listening at: http://0.0.0.0:51141 (4)
2019-01-20T10:42:53.819843+00:00 app[web.1]: [2019-01-20 10:42:53 +0000] [4] [INFO] Using worker: sync
2019-01-20T10:42:53.828847+00:00 app[web.1]: [2019-01-20 10:42:53 +0000] [10] [INFO] Booting worker with pid: 10
2019-01-20T10:42:53.842609+00:00 app[web.1]: [2019-01-20 10:42:53 +0000] [10] [ERROR] Exception in worker process
2019-01-20T10:42:53.842613+00:00 app[web.1]: Traceback (most recent call last):
2019-01-20T10:42:53.842634+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
2019-01-20T10:42:53.842636+00:00 app[web.1]: worker.init_process()
2019-01-20T10:42:53.842638+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 129, in init_process
2019-01-20T10:42:53.842640+00:00 app[web.1]: self.load_wsgi()
2019-01-20T10:42:53.842641+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi
2019-01-20T10:42:53.842643+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2019-01-20T10:42:53.842645+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
2019-01-20T10:42:53.842646+00:00 app[web.1]: self.callable = self.load()
2019-01-20T10:42:53.842648+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load
2019-01-20T10:42:53.842649+00:00 app[web.1]: return self.load_wsgiapp()
2019-01-20T10:42:53.842651+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp
2019-01-20T10:42:53.842652+00:00 app[web.1]: return util.import_app(self.app_uri)
2019-01-20T10:42:53.842654+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.7/site-packages/gunicorn/util.py", line 350, in import_app
2019-01-20T10:42:53.842655+00:00 app[web.1]: __import__(module)
2019-01-20T10:42:53.842657+00:00 app[web.1]: File "/app/pages_project/wsgi.py", line 12, in <module>
2019-01-20T10:42:53.842659+00:00 app[web.1]: from django.core.wsgi import get_wsgi_application
2019-01-20T10:42:53.842660+00:00 app[web.1]: ModuleNotFoundError: No module named 'django'
2019-01-20T10:42:53.842863+00:00 app[web.1]: [2019-01-20 10:42:53 +0000] [10] [INFO] Worker exiting (pid: 10)
2019-01-20T10:42:53.896070+00:00 app[web.1]: [2019-01-20 10:42:53 +0000] [4] [INFO] Shutting down: Master
2019-01-20T10:42:53.897096+00:00 app[web.1]: [2019-01-20 10:42:53 +0000] [4] [INFO] Reason: Worker failed to boot.
2019-01-20T10:43:19.406325+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=fierce-citadel-56963.herokuapp.com request_id=f4ef3347-68f0-4fd1-afc6-0a5aa3eeea01 fwd="27.54.184.196" dyno= connect= service= status=503 bytes= protocol=https

我已经阅读了很多答案,但是我无法弄清为什么会这样。 我只使用pipfile,没有Requirement.txt,我也需要Requirement文件吗?

0 个答案:

没有答案