$ python app.py
Traceback (most recent call last):
File "app.py", line 1, in <module>
from flask import FLASK
ImportError: cannot import name 'FLASK' from 'flask' (/Users/kiran/anaconda3/lib/python3.7/site-packages/flask/__init__.py)
答案 0 :(得分:3)
您错误地将flask
大写。应该是:
from flask import Flask
答案 1 :(得分:0)
此处** FLASK *表示错误,而不是FLASK写Flask
from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
return "Hello World!"
if __name__ == "__main__":
app.run()