My Google App Engine app uses Datastore NDB. So I am importing:
from google.appengine.ext import ndb
but when I deploy and go to my app there is an error:
ModuleNotFoundError: No module named 'google.appengine'
so how do I get GAE to install this part of the Google Cloud SDK?
You didn't say which runtime you're trying to deploy to (Python 2.7 or 3.7) but I'm guessing it's 3.7.
The
google.appengine
module is only available in the first-generation Python 2.7 runtime. If you need to use it, you will need to deploy your app to this runtime.From Using the ndb client library: