Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ImportError: No module named flask_login even though I have it installed

Tags:

python

I'm new at this and have no idea of what I'm doing wrong: I have installed the flask_login module with

pip install flask_login

It apparently worked: if see it installed in c:\users\~\python\python36-32\lib\site-packages

And when I use pip list, I can see it listed as Flask-Login (0.4.0)

Despite of this, when I try to run from flask_login import LoginManager, I'm getting ImportError: No module named flask_login.

What am I doing wrong?

like image 289
Original BBQ Sauce Avatar asked Oct 29 '17 21:10

Original BBQ Sauce


1 Answers

I figured out what was happening.

For some reason, Anaconda installed Python 2.7 in a path that was colliding with the one I use normally (w/ Python 3). Once I uninstalled Python 2.7, everything worked fine.

For some reason, only flask_login was being affected. My other flask_** libraries were working fine.

like image 159
Original BBQ Sauce Avatar answered Oct 30 '22 14:10

Original BBQ Sauce