在运行第九章程序时遇到下列问题,说我没有安装模块flask-avatars,可是我明明在命令行下安装了这个包,且在pycharm该项目的设置中看到了该依赖包。下面是具体报错信息
-
File “C:\Users\lenovo.virtualenvs\helloflask-hUtz0ICQ\lib\site-packages\flask\cli.py”, line 325 , in
__call__
self._flush_bg_loading_exception()
-
File “C:\Users\lenovo.virtualenvs\helloflask-hUtz0ICQ\lib\site-packages\flask\cli.py”, line 313 , in
_flush_bg_loading_exception
reraise(*exc_info)
-
File “C:\Users\lenovo.virtualenvs\helloflask-hUtz0ICQ\lib\site-packages\flask_compat.py”, line 35 , in
reraise
raise value
-
File “C:\Users\lenovo.virtualenvs\helloflask-hUtz0ICQ\lib\site-packages\flask\cli.py”, line 302 , in
_load_app
self._load_unlocked()
-
File “C:\Users\lenovo.virtualenvs\helloflask-hUtz0ICQ\lib\site-packages\flask\cli.py”, line 317 , in
_load_unlocked
self._app = rv = self.loader()
-
File “C:\Users\lenovo.virtualenvs\helloflask-hUtz0ICQ\lib\site-packages\flask\cli.py”, line 372 , in
load_app
app = locate_app(self, import_name, name)
-
File “C:\Users\lenovo.virtualenvs\helloflask-hUtz0ICQ\lib\site-packages\flask\cli.py”, line 242 , in
locate_app
‘\n\n{tb}’.format(name=module_name, tb=traceback.format_exc())
flask.cli.NoAppException: While importing “albumy”, an ImportError was raised: Traceback (most recent call last): File “C:\Users\lenovo.virtualenvs\helloflask-hUtz0ICQ\lib\site-packages\flask\cli.py”, line 235, in locate_app import(module_name) File “D:\Meetu\albumy_init_.py”, line 15, in <module> from albumy.blueprints.admin import admin_bp File “D:\Meetu\albumy\blueprints\admin.py”, line 12, in <module> from albumy.extensions import db File “D:\Meetu\albumy\extensions.py”, line 8, in <module> from flask_avatars import Avatars ModuleNotFoundError: No module named ‘flask_avatars’