gpt4 book ai didi

python - 导入错误 : No module named jinja2

转载 作者:IT老高 更新时间:2023-10-28 20:27:17 26 4
gpt4 key购买 nike

使用 google-app-engine 教程,我收到以下错误堆栈消息:

Traceback (most recent call last):
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\runtime\wsgi.py", line 239, in Handle
handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\runtime\wsgi.py", line 298, in _LoadHandler
handler, path, err = LoadObject(self._handler)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\runtime\wsgi.py", line 84, in LoadObject
obj = __import__(path[0])
File "D:\Dev\SandBoxes\web\omaha\omaha.py", line 4, in <module>
import jinja2
ImportError: No module named jinja2

即使我在 app.yaml 的库中声明了它:

application: ***
version: 1
runtime: python27
api_version: 1
threadsafe: true

libraries:
- name: jinja2
version: latest
- name: webapp2
version: latest


handlers:
- url: /css
static_dir: css
- url: /js
static_dir: js
- url: /img
static_dir: img
- url: /.*
script: omaha.application

有人遇到过类似的问题吗?

最佳答案

要在本地使用Jinja,需要在本地安装

easy_install Jinja2

pip install Jinja2

关于python - 导入错误 : No module named jinja2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18944345/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com