a year ago
Hello
I have been trying to deploy my React + Flask project and tried all I can but keep getting gunicorn: command not found despite the fact that I have it in my requirements.txt file. Any help here? I've also deployed successfully before and then Ive change a small thing in my homepage for other reasons and havent been able to deploy anymore for Gunicorn...
Pinned Solution
a year ago
Hey, can you check your build logs and see if Python is actually detected, assuming that you are using a monorepo and it somehow only detected Node for your React frontend. Furthermore, if you are using Nixpacks to build your application, check if Python is listed as a provider in your service's build settings, add it as such if it isn't listed.
3 Replies
a year ago
Hey, can you check your build logs and see if Python is actually detected, assuming that you are using a monorepo and it somehow only detected Node for your React frontend. Furthermore, if you are using Nixpacks to build your application, check if Python is listed as a provider in your service's build settings, add it as such if it isn't listed.
a year ago
It looks like gunicorn wasn't actually installed (thus will never be found). Even if you have it in your requirements.txt, sometimes it just doesn’t show up when you deploy.
First, check your requirements.txt for any typos—should be just gunicorn, all lowercase. If that’s fine, make sure your deploy actually runs pip install -r requirements.txt (sometimes a Dockerfile or build script skips it by accident). Also make sure to rebuild the docker image if you're using docker. Otherwise it'll probably not work.
You can also try clearing the build cache and redeploying (old stuff can get stuck and mess things up). Also, peek at your build logs for any errors during the install step; sometimes one broken package can stop the rest from installing, but it’s easy to miss. Railway logs are kind of confusing tbh.
Anyway, if you’re calling gunicorn in your start command and it still says “not found,” try running it as python -m gunicorn ...(sometimes it’s installed but not on the PATH).
a year ago
Check the virtual environment, created or activated:
- python3 -m venv venv (create)
- source venv/bin/activate (activate)
- pip install gunicorn (install)
Status changed to Solved uxuz • 12 months ago

