Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does running `flask run` on Windows result in "flask is not recognized as an internal or external command, operable program or batch file"

I needed to setup Flask for windows, so I ran the following commands:

set FLASK_APP=application.py
set FLASK_DEBUG=1
set DATABASE_URL='postgres.......' =>(the credential given by the Heroku account)
flask run

But when I hit enter on the flask run, I get an error that says -

flask is not recognized as an internal or external command, operable program or batch file

Why is this not working? I've been trying to work on it but I'm still having the same error message.

What could be the issue?

like image 479
Nsikan Adaowo Avatar asked Sep 14 '25 10:09

Nsikan Adaowo


1 Answers

Try using:

python -m flask run 

Also make sure you are in the same directory as application.py

like image 186
kidbilly Avatar answered Sep 15 '25 23:09

kidbilly