Software⏱️ 2 min read📅 2026-05-31

How to Fix: Heroku + gunicorn not working (bash: gunicorn: command not found )

Gunicorn installation issue on Heroku. Check if gunicorn is in the system path.

Quick Answer: Verify that gunicorn is installed correctly and add it to the system path by running 'export PATH=$PATH:/usr/local/bin/gunicorn' after installation.

The error message 'bash: gunicorn: command not found' indicates that the system cannot find the gunicorn executable. This issue can occur even after a successful installation of gunicorn.

🛑 Root Causes of the Error

  • Outdated system paths or incorrect installation of gunicorn.

✅ Best Solutions to Fix It

Method 1: Update System Paths

  1. Step 1: Open the terminal and run the command `export PATH=$PATH:/usr/bin/gunicorn` to update the system path.

Method 2: Verify Installation

  1. Step 1: Run the command `which gunicorn` to verify if gunicorn is installed in the system.

✨ Wrapping Up

To resolve this issue, try updating your system paths or verifying that gunicorn is installed correctly. If you are still facing issues, consider reinstalling gunicorn.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions