ImportError: No module named flask_wtf

kanishka makhija picture kanishka makhija · May 23, 2017 · Viewed 21.8k times · Source

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)

Answer

GPrathap picture GPrathap · Oct 12, 2017

I also have same issue. But installing Flask-WTF

  sudo pip install flask-wtf

I was able to resolve this issue.