I am following the book explore flask on explore flask site, I am getting this error, I just installed flask-login and import this as following
pip install flask-login
from flask_login import login_required
I expect to save this normally without any errors, but VS CODE terminal show this error "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
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.