I am getting the following error when trying to run flask
Error: Could not locate a Flask application. Use the ‘flask –app’ option, ‘FLASK_APP’ environment variable, or a ‘wsgi.py’ or ‘app.py’ file in the current directory.
I’m using python in Windows. I try to do the following:
set FLASK_APP=main.py
set FLASK_ENV=development
python -m flask run
when I do this, I receive the error. I am in the correct folder and my file name is not “flask.py”
it worked one time and I have not been able to get it to work since. thanks in advance
user25575760 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.