How to fix ModuleNotFoundError: No module named 'gunicorn'
ModuleNotFoundError: No module named 'gunicorn'
For web development, always isolate your dependencies in a virtual environment.
Using Docker? Ensure you add `gunicorn` to your `requirements.txt` and rebuild the container.
python -m pip install gunicorn
Verification
Command
python -c "import gunicorn; print(gunicorn.__version__)"
Expected output
Success! gunicorn version x.y.z (e.g., 2.4.0)