导入错误:没有模块名为google.appengine.ext(云端点框架V2)

问题描述:

我尝试使用谷歌端点V2 下面这个tutorial导入错误:没有模块名为google.appengine.ext(云端点框架V2)

我已经做了所有步骤,直到生成所需的配置文件:步骤

但是,当我尝试使用以下命令

蟒蛇的lib /端点/ endpointscfg.py get_swagger_spec main.EchoApi --hostname echo-api.endpoints.xxxxxxx.appspot.com

我得到以下警告和错误

WARNING: Could not find the fix_sys_path() function in dev_appserver.
If you encounter errors, please make sure that your Google App Engine SDK is up-to-date.
Traceback (most recent call last):
      File "lib/endpoints/endpointscfg.py", line 59, in
         import _endpointscfg_setup # pylint: disable=unused-import
      File "D:\Libraries\Documents\transporter\lib\endpoints_endpointscfg_setup.py", line 107, in
       ` _SetupPaths()
      File "D:\Libraries\Documents\transporter\lib\endpoints_endpointscfg_setup.py", line 103, in _SetupPaths
        from google.appengine.ext import vendor
ImportError: No module named google.appengine.ext

,并产生

我重新安装了一切没有OpenAPI的配置文件,更新的一切,检查系统变量,但仍然得到错误

PS Windows 7

+0

google.appengine.ext与谷歌云SDK封装在App Engine SDK的一部分。你有没有在你的Python路径中包含该位置? – HondaGuy

+0

@HondaGuy这就是答案,l更新了我的Python路径,它工作:)谢谢 –

+0

我没有足够的代表评论Tungamirai Mangombe的答案。 对我来说,它添加了:C:\ Program Files(x86)\ Google \ Cloud SDK \ google-cloud-sdk \ platform \ google_appengine \ google \ appengine即与其他:\ google \ appengine回答。修复它。 – SLLegendre

@ HondaGuy的评论是我的应用程序引擎添加到我的Python路径,

我的Python环境变量现在看起来是这样

C:\Python27\Lib;C:\Python27\DLLs;C:\Python27\Lib\lib-tk;C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\platform\bundledpython;C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine;