I am getting the error, ImportError: No module named flask_wtf
. I tried every possible solution. I installed flask-wrf using -
$ flask/bin/pip install flask-wtf
Requirement already satisfied: flask-wtf in ./flask/lib/python2.7/site-packages
Requirement already satisfied: WTForms in ./flask/lib/python2.7/site-packages.
Please help me out with this issue.
I am sharing my code which shows error:
from flask_wtf import Form
from wtforms import StringField, BooleanField
from wtforms.validators import DataRequired
class LoginForm(Form):
openid = StringField('openid', validators=[DataRequired()])
remember_me = BooleanField('remember_me', default=False)
I also have same issue. But installing Flask-WTF
pip install flask-wtf
I was able to resolve this issue.
Ensure you run the virtual environment's python rather than global python. I resolved this in my windows env through executing:
\inetpub\projectFolder\scripts\python.exe run.py
rather than just
python run.py
Also, make sure that you have installed the modules to the virtual environment rather than globally. Check that the modules exist appropriately - again under windows I checked for the file:
\inetpub\projectFolder\lib\site-packages\wtforms
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