Gunicorn: command not found when deploying to heroku!

am kind of new the Dash … i have created a and managed to run it successfully locally.
but when i try to deploy it to Heroku i get the error [ bash: gunicorn: command not found]
i made sure that:

1- requirements.txt included gunicorn [gunicorn==20.0.4]

2- has the following:
- app = dash.Dash(name, external_stylesheets=external_stylesheets)
-server = app.server

3- and Procfile holds the .py app name
web: gunicorn dashanalytics:server

i tried re-installing all the requirements and creating a new environment … but its always the same error!!

i would really appreciate the help!

1 Like

I haven’t worked with Heroku, but I’ve copied my Gunicorn command below per chance it’s useful in some way:

/opt/rh/rh-python36/root/usr/bin/gunicorn --workers 5 --threads 2 --keep-alive 5 --preload --log-level info --capture-output --error-logfile /var/www/aar_customer/logs/aar_customer.log --pythonpath /var/www/aar_customer --bind aar_customer:server

I am having a similar issue while trying to deploy to heroku. Have you found any solutions to this problem?

Hello! Are you able to follow the steps described at Deploy your Dash App | Dash for Python Documentation | Plotly under the " Heroku for Sharing Public Dash apps for Free" section to deploy the sample application there?