4

I am trying to deploy my python flask app to heroku but it keeps crashing and complaining about bash: gunicorn: command not found. I have my requirement.txt file in the root folder where my Procfile is also located. My python code is located in src/server/

Procfile contains: web: gunicorn --pythonpath src/server/ route:app --preload

I have gunicorn in my requirements file:

Is there something i'm missing?

     gunicorn==19.8.1
     Flask==0.12.2
     Flask-Cache==0.13.1
     Flask-Cors==3.0.2
     Flask-MongoAlchemy==0.5.1
     flask-mongoengine==0.9.5
     Flask-PyMongo==0.5.2
     Flask-WTF==0.14.2
     gevent==1.2.1
     greenlet==0.4.12
     pymongo==3.6.1

folder structure;

enter image description here

enter image description here

davidism
  • 121,510
  • 29
  • 395
  • 339
charles okojie
  • 708
  • 2
  • 10
  • 23

3 Answers3

2

I faced a similar problem with my app. I just reset all my requirements by sending in an empty requirements.txt file. Then built my app. Then sent the original file. I don't understand why, but it worked.

unholy_me
  • 460
  • 3
  • 14
1

I am also having a similar problem like this on Heroku. I created an IDENTICAL new project and magically it works. Heroku has some bug related to ignoring requirements.txt

0

I fixed it by creating a new environment in Heroku. The previous environment seems not to be reading the requirement.txt file, I couldn't figure why.

charles okojie
  • 708
  • 2
  • 10
  • 23