【发布时间】:2016-11-11 22:16:11
【问题描述】:
我正在尝试设置一个将部署在 Google App Engine 上的烧瓶应用程序。
我的烧瓶应用程序依赖于 Google Cloud Storage - Datastore。
google-cloud 等。
我运行 pip install -t lib -r requirements.txt 将我的所有依赖项安装到 lib 目录中。
当我在烧瓶应用程序的根目录中运行dev_appserver.py 时,我得到以下ImportError
ImportError: No module named google.cloud.datastore
不知道为什么我会看到这个。查看lib 目录,看起来 pip 安装了我所有的依赖项。
为什么本地应用引擎无法找到该模块。
我意识到我应该使用 App Engine 的 Datastore,它略有不同,并且需要进行大量代码更改。但是为什么 App Engine 找不到和使用 Google 数据存储模块
仅供参考,我在 Mac OS-X 上运行它
【问题讨论】:
-
在您的
appengine_config.py文件中,您是否指定了您的lib文件夹的路径? -
是的,我有那个文件并将 lib 添加到路径中。
-
您还在遇到这个问题吗?如果是这样 - 你能提供你的
dev_appserver.py的内容和你的应用程序的文件结构吗?
标签: python google-app-engine google-cloud-storage google-cloud-datastore