无法获得用于烧瓶或Django的Appengine python示例

时间:2018-07-07 11:28:56

标签: python google-app-engine

我已经下载了appengine示例。

当我进入目录python-docs-samples / appengine / standard / django并将其安装在我的appengine项目上,然后查看项目网页时,出现此错误:

Traceback (most recent call last):

  File "/base/alloc/tmpfs/dynamic_runtimes/python27/b93f87cfaa0115e5_unzipped/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 240, in Handle
    handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
  File "/base/alloc/tmpfs/dynamic_runtimes/python27/b93f87cfaa0115e5_unzipped/python27_lib/versions/1/google/appengine/api/lib_config.py", line 358, in __getattr__
    self._update_configs()
  File "/base/alloc/tmpfs/dynamic_runtimes/python27/b93f87cfaa0115e5_unzipped/python27_lib/versions/1/google/appengine/api/lib_config.py", line 294, in _update_configs
    self._registry.initialize()
  File "/base/alloc/tmpfs/dynamic_runtimes/python27/b93f87cfaa0115e5_unzipped/python27_lib/versions/1/google/appengine/api/lib_config.py", line 165, in initialize
    import_func(self._modname)
  File "/base/alloc/tmpfs/dynamic_runtimes/python27/b93f87cfaa0115e5_unzipped/python27_dist/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/base/data/home/apps/s~forcediagnosticsclinic/20180707t052537.410964682053028174/appengine_config.py", line 18, in <module>
    vendor.add('lib')
  File "/base/alloc/tmpfs/dynamic_runtimes/python27/b93f87cfaa0115e5_unzipped/python27_lib/versions/1/google/appengine/ext/vendor/__init__.py", line 44, in add
    'No such virtualenv or site directory' % path)
ValueError: virtualenv: cannot access lib: No such virtualenv or site directory

这是怎么回事?

2 个答案:

答案 0 :(得分:0)

您的应用程序配置引用了名为**REGOPT** (PVCALC, PVPRINT, STARS);的文件夹,但该文件夹丢失或您忘记了对其进行正确复制。尝试在本地计算机上运行相同的项目。

答案 1 :(得分:0)

Lenik是对的。具体来说,您似乎没有在本教程中执行此步骤:

pip install -r requirements-vendor.txt -t lib/

https://cloud.google.com/python/django/appengine#run_the_app_on_your_local_computer