【发布时间】:2017-04-29 22:29:24
【问题描述】:
我正在阅读 App Engine 上 Cloud Endpoints Frameworks 的 Python 快速入门。我尝试通过调用 Endpoints Tool 生成 OpenAPI 配置文件并收到此错误:
python lib/endpoints/endpointscfg.py get_swagger_spec main.EchoApi --hostname echo.endpoints.[YOUR-PROJECT-ID].cloud.goog
Traceback (most recent call last):
File "lib/endpoints/endpointscfg.py", line 59, in <module>
import _endpointscfg_setup # pylint: disable=unused-import
File "/Users/myName/lab/python-docs-samples/appengine/standard/endpoints-frameworks-v2/echo/lib/endpoints/_endpointscfg_setup.py", line 98, in <module>
_SetupPaths()
File "/Users/myName/lab/python-docs-samples/appengine/standard/endpoints-frameworks-v2/echo/lib/endpoints/_endpointscfg_setup.py", line 94, in _SetupPaths
from google.appengine.ext import vendor
ImportError: No module named appengine.ext
我的理解是这是某种包装问题?这是在这里讨论的问题,但我仍然卡住:Error running endpointscfg.py get_swagger_spec。任何帮助将非常感激。
【问题讨论】:
-
嘿@dgmt 我被困在您在上述链接问题中回答的相同问题上。希望您可以进一步扩展您如何解决该问题。我已经学会了如何创建和激活一个 virtualenv 目录来解决它,但我不确定
-
*关于如何在其中使用endpointscfg.py?或者你知道一些对我有帮助的文档?
标签: python-2.7 google-app-engine virtualenv google-cloud-endpoints