← All errors · Replit

ModuleNotFoundError: No module named 'flask'

Exact error

ModuleNotFoundError: No module named 'flask'

What it means

The Python interpreter running your code doesn't have the package installed.

Likely causes

How to fix it

  1. Install with the same interpreter that runs your code:

    python -m pip install flask
  2. Record it so deploys install it too:

    echo "flask" >> requirements.txt

Related errors

Get new fixes weekly

No spam. Unsubscribe anytime. Privacy