1

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
2

1 Answer 1

2

Try this:

from flaskext.mysql import MySQL

instead of

from flask.ext.mysql import MySQL
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.