原因:flask版本过高,flask里面的 ._compat.py文件没有;
解决方案1:解决:降低flask版本,1.1.2即可
pip install flask==1.1.2
解决方案2:更改flask_script文件,Ctrl + 左键 进入到flask_script的 __init__.py
源码文件中,将 from flask._compat import text_type
语句改成 from flask_script._compat import text_type
如图:
- ModuleNotFoundError module compat flask namedmodulenotfounderror module compat flask modulenotfounderror module named 39 modulenotfounderror watchdog module named modulenotfounderror module kornia named modulenotfounderror packaging module named modulenotfounderror module pandas named modulenotfounderror module infer named modulenotfounderror module named torch modulenotfounderror module lanms named modulenotfounderror module qrcode named