gpt4 book ai didi

python - 导入错误 : Failed to import the Cloud Firestore library for Python

转载 作者:太空狗 更新时间:2023-10-29 21:33:22 24 4
gpt4 key购买 nike

尝试在 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 需要 grpc

pip install grpcio

但是,根据您的操作系统,还有其他步骤。查看 https://github.com/grpc/grpc/tree/master/src/python/grpcio

关于python - 导入错误 : Failed to import the Cloud Firestore library for Python,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48264536/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com