Error in running FLASK on anaconda Prompt
·
Answer a question
I want to start the flask server using anaconda Prompt. while starting,it is showing the following error.How to resolve error. I am getting the following error.
- Environment: production WARNING: Do not use the development server in a production environment. Use a production WSGI server instead.
- Debug mode: off Usage: flask run [OPTIONS]
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.
Answers
The problem is you need to set flask's debug mode to true.
set FLASK_APP = yourfilename.py
set FLASK_DEBUG = 1
and then use:
flask run
to run your server.
Note: If you are on mac/linux use export instead of set
更多推荐
所有评论(0)