1 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 August 16, 2019
1 min read
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 October 5, 2019

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