Reputation: 31
I'm following this Python-Flask Web App tutorial:
On Step 5, it says to install Flask-Mysql and then import it using this:
from flaskext.mysql import MySQL
However, I keep getting the error when I try to run the app that:
ImportError: no module named flaskext.mysql
I'm not sure what I'm doing wrong? I have MySQL installed already. I installed Flask and Flask-Mysql using pip
.
Thank you, Amy
Upvotes: 3
Views: 9504
Reputation: 1103
first you have to install flask-mysql using following command:
sudo pip install flask-mysql
and then import mysql from flaskext.mysql import MySQL it works fine for me :)
Upvotes: 5