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

2.1k Views Asked by At

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?

1

There are 1 best solutions below

2
On

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)