Unable to import flask_login

Make sure you have installed the version of Flask-Login which is compatible with your Python Version. If you're using Python 3 in your Flask App you need pip3 to install compatible parts.

Try:

sudo apt install python3-pip

Then:

pip3 install flask-login

  • First, make sure that flask_login was installed successfully by running "pip list" in your project directory terminal, If it isn't there then you should install it again
  • Second, if it is there so make sure of any typo mistakes, also you can share that piece of code to check it.