ModuleNotFoundError: No module named 'flask_login'

说明

在安装flask-login后, 初始化之后, 运行报错

flask.cli.NoAppException

flask.cli.NoAppException: While importing "app", an ImportError was raised:

Traceback (most recent call last):
  File "D:\Python_Env\Envs\flask-env\lib\site-packages\flask\cli.py", line 235, in locate_app
    __import__(module_name)
  File "E:\code\python\project\fisherBook_demo\app\__init__.py", line 4, in <module>
    from flask_login import LoginManager
ModuleNotFoundError: No module named 'flask_login'

安装环境

Name: Flask-Login
Version: 0.4.1
Summary: User session management for Flask
Home-page: https://github.com/maxcountryman/flask-login
Author: Matthew Frazier
Author-email: [email protected]
License: MIT
Location: d:\python_env\envs\fisher-env\lib\site-packages
Requires: Flask
Required-by: Flask-Security

使用Pycharm运行程序, 直接报错, 于是直接运行命令:
ModuleNotFoundError: No module named 'flask_login'_第1张图片
程序直接运行


提醒自己

以后遇到非人性错误, 考虑不依赖工具(先升级再说)


更新完没解决问题, 使用命令启动flask服务 …

你可能感兴趣的:(解决毛病)