flask environment error in windows1 min read
How to solve this error
Error: Could not locate a Flask application. You did not provide the “FLASK_APP” environment variable, and a “wsgi.py” or “app.py” module was not found in the current directory.
Vishal Sharma Answered question
here’s how I solved it.
first, go to the directory using your command prompt where your webapp for flask is located and then type these two commands.
set FLASK_APP="abc.py" set FLASK_ENV=development
here abc is your webapp for flask to run.
then simply run flask
flask run
hope this will help
Kapil Bansal Posted new comment

Don’t use quotes with your file name otherwise it would give you an error.