ImportError: No module named flask.ext.login
If following does not work:
from flask.ext.login import LoginManager
try the following:
from flask_login import LoginManager
This is the new convention.
To find the flask-login version, you can run the following command in terminal. Just change the name to know the version of other packages.
pip show flask-login
Install pip and then use the following command:
C:\Python27\scripts>pip install Flask-Login
If you have already installed flask-login by
$pip install flask_login
Try replacing the
from flask.ext.login import LoginManager
with
from flask_login import LoginManager