Search code examples
pythongoogle-app-enginegoogle-cloud-platformgoogle-cloud-endpoints

ImportError: No module named google.appengine.ext (Cloud Endpoints Frameworks v2)


I am trying to use google endpoint v2 following this tutorial

I have done all steps up until the To generate the required configuration file: Step

But when i try the following command

python lib/endpoints/endpointscfg.py get_swagger_spec main.EchoApi --hostname echo-api.endpoints.xxxxxxx.appspot.com

I get the following warning and error

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

And no OpenAPI configuration file is generated

I have reinstalled everything,updated everything , checked system variables but still getting the error

p.s on windows 7


Solution

  • @HondaGuy's Comment was the answer I added app-engine to my python path,

    my python environment variable now looks like this

    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;