简体   繁体   中英

ImportError: No module named grpc._cython.cygrpc in AppEngine standard local

Hi I get the following error:

grpc/ init .py", line 22, in from grpc._cython import cygrpc as _cygrpc File "~/bin/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/python/runtime/sandbox.py", line 1095, in load_module raise ImportError('No module named %s' % fullname) ImportError: No module named grpc._cython.cygrpc

resulting from this code: from google.cloud import language in an App Engine Standard running locally (Python 2.7).

I have seen posts from a few years ago which say that certain google cloud libraries may not be supported for running on the standard environment or running locally. It is not clear from documentation (very different at the product page and github), the several bug reports and community discussions, whether I would be able to use the Google Cloud Natural Language API for the standard environment, locally, at this time, or not.

Is there any definitive documentation for this, or possibly some other reason for this error?

According to comments on gax-python issue 149 grpc (present in your traceback) is not yet supported on GAE standard environment:

As a heads up, even if you get gax to work, grpc-based APIs will not work on App Engine standard right now.

So all google cloud libraries using grpc won't work on GAE standard environment (at least the first generation/Python 2.7 one, I'm not sure if the same applies to the 2nd generation/Python 3 one)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM