无法在 Google App Engine 中导入数据存储

Can't import datastore in Google App Engine

我正在尝试以这种方式将数据存储导入我在 GAE 中的代码,

from google.cloud import datastore

不幸的是,我在 stackdriver 中收到了这样的错误消息

     from grpc._cython import cygrpc as _cygrpc
ImportError: dynamic module does not define init function (initcygrpc)

或者像这样

     from google.cloud.datastore_v1 import types 
ImportError: cannot import name types

有人知道原因吗? 提前致谢

====
环境:标准
语言:python
运行时间:python27

那是通用客户端数据存储库,不再兼容标准环境GAE沙盒限制。查看相关

来自Google App Engine Standard Environment Client Libraries

Note: For App Engine applications that are written in Python, the Google Datastore DB Client Library is no longer recommended; use the Google Datastore NDB Client Library instead.

所以切换到 NDB(我发现它更好,具有更多的功能,针对 GAE 进行了优化并且有更好的文档记录,就在特定于 GAE 的文档区域)。