Deployment Issue: gunicorn: command not found Error During Application Launch
saqibshouqi
TRIALOP

a year ago

Dear Support Team,

I’m encountering an issue while deploying my Flask application on Railway. The deployment logs indicate that the gunicorn command is not found during the startup process, even though gunicorn is listed in my requirements.txt file.

Here’s a summary of the issue:

Error in Logs:

/bin/bash: line 1: gunicorn: command not found

This error repeats multiple times during the container startup.

Steps I’ve Taken:

Added gunicorn==23.0.0 to requirements.txt.
Created a Procfile with web: gunicorn app:app.
Added a start.sh script to explicitly run gunicorn app:app.

Current Setup:
The application is a Flask-based Python app.

Despite these steps, the gunicorn command is not recognized during deployment. Could you please help me troubleshoot this issue? Let me know if you need additional details.

Thanks,
Saqib

View Deploy details

ⓘ Deployment information is only viewable by project members and Railway employees.

1 Replies

brody
EMPLOYEE

a year ago

Hello,

Since this is a Python app that uses build deps from Node, I have added Python to the list of providers in the service settings for you.

While this helped, we have run into another issue now, you likely froze all pip packages you had installed on your computer into your requirements.txt file, this includes way more then what your project needs, but the issue is specifically a windows only package, we run your applications in a linux environment, so you can see the issue there.

Please work on trimming your requirements.txt file to only packages your application uses.

Best,

Brody


Loading...