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 generate_password_hash, check_password_hash
I started in windows, I got the same error :
ImportError: No module named flask.ext.mysql
Someone told me don't develop python in windows, it's lot of headache, so I started the same project in Ubuntu, but I got the same problem :
vagrant@precise32:/vagrant/FlaskMysql/FlaskApp$ python app.py Traceback (most recent call last): File "app.py", line 2, in <module> from flask.ext.mysql import MySQL File "/usr/local/lib/python2.7/dist-packages/flask/exthook.py", line 87, in load_module raise ImportError('No module named %s' % fullname) ImportError: No module named flask.ext.mysql
Please your help is appreciated.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With