尝试运行我的Google App Engine应用时,出现以下错误:
(/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/runtime/wsgi.py:263)
Traceback (most recent call last):
File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 240, in Handle
handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 299, in _LoadHandler
handler, path, err = LoadObject(self._handler)
File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 96, in LoadObject
__import__(cumulative_path)
File "/base/data/home/apps/p~mygoolgeappproject/3.402458165629390060/village/main.py", line 4, in <module>
import flask
File "/base/data/home/apps/p~mygoolgeappproject/3.402458165629390060/libs/flask/__init__.py", line 19, in <module>
from jinja2 import Markup, escape
File "/base/data/home/apps/p~mygoolgeappproject/3.402458165629390060/libs/jinja2/__init__.py", line 41, in <module>
from jinja2.bccache import BytecodeCache, FileSystemBytecodeCache, \
ImportError: No module named bccache
答案 0 :(得分:0)
目前尚不清楚您是使用App Engine Standard还是App Engine Flexible环境。我猜测它是App Engine Standard并发布了这个答案。
App Engine Standard在运行时环境中只有一组有限的库。如果您需要添加任何第三方库,则需要按照this guide手动添加它们。
您还可以查看这些答案以获取更多信息。
答案 1 :(得分:0)
我找到了解决方案,问题是某些库没有像Jinja2那样正确安装。 我重新安装它并且工作正常。