ModuleNotFoundError: No module named 'flask._compat'

出现 “ModuleNotFoundError: No module named 'flask._compat'” 提示的解决办法:

参考 https://zhuanlan.zhihu.com/p/375485831 最后的评论:

不用降低版本,修改flask_script 文件就可以
It happened because the python searched on Flask._compat directory and It isn't there, so I changed like on below : (on flask_script/__init__.py)

Where:

from ._compat import text_type on original flask-script file

to :

from flask_script._compat import text_type

posted @ 2023-02-26 13:06  我是包子  阅读(1119)  评论(0编辑  收藏  举报