简体   繁体   中英

ModuleNotFoundError: No module named 'flask_bootstrap' and 'flask_login'

from flask_bootstrap import Bootstrap
from flask_login import LoginManager, UserMixin, login_user, login_required, logout_user, current_user

I get this error message: ModuleNotFoundError: No module named 'flask_bootstrap'

I have done pip install flask_bootstrap and pip install flask_login , and they seem to be successfully installed. They are both in C:\users\samuel\appdata\local\programs\python\python310\lib\site-packages, and both appear when I do pip list

I have tried installing it with and without a venv, and restarting visual studio code. I am on Windows 10. Other imports such as flask, flask_wtf which is in the same directory, work fine and dont have this issue.

Open your terminal or CMD and run these two commends

pip install Flask-Login
pip install Flask-Bootstrap

Don't warry, It is solve your problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM