Heroku: no module named flask though it is in requ

2019-07-20 05:03发布

问题:

Can anyone help with this error on Heroku?

2015-01-12T22:26:00.575669+00:00 heroku[web.1]: Starting process with command `python hangman.py`
2015-01-12T22:26:01.066240+00:00 app[web.1]: Traceback (most recent call last):
2015-01-12T22:26:01.066256+00:00 app[web.1]:   File "hangman.py", line 3, in <module>
2015-01-12T22:26:01.066262+00:00 app[web.1]:     from flask import (
2015-01-12T22:26:01.066268+00:00 app[web.1]: ImportError: No module named flask
2015-01-12T22:26:01.742444+00:00 heroku[web.1]: Process exited with status 1
2015-01-12T22:26:01.751614+00:00 heroku[web.1]: State changed from starting to crashed

My git repo is here: https://github.com/PJBentham/Hangman

I believe I have done everything correct as far as set up is concerned but I'm still getting the above error and can't figure out why?

回答1:

You have to show the last or pull traceback to debug further ...! You git repo working perfectly fine.

From your traceback snippet flask is not there. Check if your app environ having flask or not using heroku run pip freeze