gpt4 book ai didi

python - 导入错误 : cannot import name 'Flask' from partially initialized module 'flask' (most likely due to a circular import)

转载 作者:行者123 更新时间:2023-12-03 16:29:24 34 4
gpt4 key购买 nike

这个问题在这里已经有了答案:





Importing installed package from script raises "AttributeError: module has no attribute" or "ImportError: cannot import name"

(3 个回答)


去年关闭。



from flask import Flask

app = Flask(__name__)

@app.route("/")
def hello():
return "Hello, World!"

最佳答案

我通过不将文件保存为“flask.py”来消除错误

关于python - 导入错误 : cannot import name 'Flask' from partially initialized module 'flask' (most likely due to a circular import),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61032702/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com