No module named 'flask.ext'解决办法

(flask) mac126@ubuntu:~/Desktop/flask_shiguangji$ python manage.py db init
  Creating directory /home/mac126/Desktop/flask_shiguangji/migrations ... done
  Creating directory /home/mac126/Desktop/flask_shiguangji/migrations/versions ... done
  Generating /home/mac126/Desktop/flask_shiguangji/migrations/env.py ... done
  Generating /home/mac126/Desktop/flask_shiguangji/migrations/README ... done
  Generating /home/mac126/Desktop/flask_shiguangji/migrations/alembic.ini ... done
  Generating /home/mac126/Desktop/flask_shiguangji/migrations/script.py.mako ... done
  Please edit configuration/connection/logging settings in '/home/mac126/Desktop/flask_shiguangji/migrations/alembic.ini' before proceeding.
(flask) mac126@ubuntu:~/Desktop/flask_shiguangji$ python manage.py db init
Traceback (most recent call last):
  File "manage.py", line 6, in <module>
    app = create_app("developConfig")
  File "/home/mac126/Desktop/flask_shiguangji/App/__init__.py", line 15, in create_app
    init_ext(app)
  File "/home/mac126/Desktop/flask_shiguangji/App/ext.py", line 23, in init_ext
    cache.init_app(app)
  File "/home/mac126/.pyenv/versions/env3.6.6/lib/python3.6/site-packages/flask_cache/__init__.py", line 156, in init_app
    from .jinja2ext import CacheExtension, JINJA_CACHE_ATTR_NAME
  File "/home/mac126/.pyenv/versions/env3.6.6/lib/python3.6/site-packages/flask_cache/jinja2ext.py", line 33, in <module>
    from flask.ext.cache import make_template_fragment_key
ModuleNotFoundError: No module named 'flask.ext'

 对你有用,留个评论肿么样?

posted @ 2018-12-13 13:44  青春叛逆者  阅读(4503)  评论(1编辑  收藏  举报