Reputation: 331
i am new to python flask and i am creating web app using python flask with MySQL and when i importing MySQL in flask i am getting error like below
from flask.ext.mysql import MySQL ModuleNotFoundError: No module named 'flask.ext'
here is my code
from flask import Flask, render_template, json, request
from flask.ext.mysql import MySQL
Upvotes: 1
Views: 208
Reputation: 775
Try this:
from flaskext.mysql import MySQL
instead of
from flask.ext.mysql import MySQL
Upvotes: 2