烧瓶运行未运行,并给我错误

时间:2020-04-11 19:43:39

标签: python flask flask-mysql

我试图运行烧瓶以及我何时运行 烧瓶运行

我收到此错误

(snoop) ether@ether:~/Documents/loginsystem$ flask run
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   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.

我做完

Run command: set FLASK_APP=main.py
Run command: set FLASK_DEBUG=1
Run command: flask run

但这并不会改变错误

我正在将本教程用于登录系统 https://codeshack.io/login-system-python-flask-mysql/

1 个答案:

答案 0 :(得分:0)

您可以尝试导出变量而不只是设置变量吗?

export FLASK_APP=main.py

不是

set FLASK_APP=main.py