L black
2021-02-08 14:00
采纳率: 0%
浏览 218
已结题

在使用vs code的debug调试flask开发时出现ModuleNotFoundError

 launch.json:

            "name": "Flask-Python",
            "type": "python",
            "request": "launch",
            "program": "${file}",
            // "module": "flask",
            "env": {
                "FLASK_APP": "${workspaceRoot}/main.py",
                "FLASK_ENV": "development",
                "FLASK_DEBUG": "0"
            },
            "args": [
                "run",
                "--no-debugger",
                "--no-reload"
            ],
            "envFile": "${workspaceRoot}/.env",
            "jinja": true,
from flask import Flask, render_template,session,redirect,url_for,flash

from flask_bootstrap import Bootstrap   #框架

from flask_moment import Moment #时间
from datetime import datetime   

from flask_wtf import FlaskForm #表单
from wtforms import  StringField
from wtforms import  SubmitField
from wtforms.validators import DataRequired

发生异常: ModuleNotFoundError

  •  

No module named 'flask_bootstrap'

File "D:\ing\vcworkspace\main.py", line 3, in <module> from flask_bootstrap import Bootstrap #框架

 

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • Bryce__LY 2021-02-08 14:27
    from flask.ext.bootstrap import Bootstrap
    评论
    解决 无用 1
    打赏 举报

相关推荐 更多相似问题