ImportError: No module named flask.ext.mysql

后端 未结 8 1800
春和景丽
春和景丽 2020-12-31 00:16

Hi I am trying to run a python file that has :

from flask import Flask, render_template, json, request
from flask.ext.mysql import MySQL
from werkzeug import         


        
相关标签:
8条回答
  • Here is the official Flask-MySQL documentation: https://flask-mysql.readthedocs.org/en/latest/# You'll find that the current import syntax is as follows:

    from flaskext.mysql import MySQL
    
    0 讨论(0)
  • 2020-12-31 01:02

    First from flaskext.mysql import MySQL worked then pip install Flask-MySQL also worked finally... it was driving me nuts! I had taken to many routes to fix it.

    0 讨论(0)
提交回复
热议问题