【发布时间】:2018-06-24 04:12:21
【问题描述】:
尝试在 python 服务器上集成 Google firestore API
...
File "/home/daffolap-355/repos/subscriptions/appvendor/firebase_admin/firestore.py", line 28, in <module>
raise ImportError('Failed to import the Cloud Firestore library for Python. Make sure '
ImportError: Failed to import the Cloud Firestore library for Python. Make sure to install the "google-cloud-firestore" module.
我在这里收到此错误:
from firebase_admin import credentials, auth, firestore
我安装了firebase-admin 模块:
pip install --upgrade -t libs firebase-admin
然后运行应用程序
dev_appserver app.yaml
【问题讨论】:
-
尝试安装
google-cloud-firestore,而不是(或除了?)firebase-admin,根据错误消息。 -
有时开发应用服务器在从本地
lib/目录加载google.*模块时遇到问题。如果确实正确安装了模块,请尝试类似here 描述的解决方案。 -
解决了吗?
标签: python firebase google-app-engine google-cloud-firestore firebase-admin