ImportError: Failed to import the Cloud Firestore library for Python

╄→尐↘猪︶ㄣ 提交于 2019-12-01 16:44:59

Google Cloud Firestore requires grpc.

pip install grpcio

However, there are additional steps depending on your OS. Check out https://github.com/grpc/grpc/tree/master/src/python/grpcio

To solve the "google-cloud-firestore" module error do this:

  • pip install google-cloud-core
  • pip install google-cloud-firestore

And then import like this:

  • import os
  • import firebase_admin
  • from firebase_admin import credentials
  • from google.cloud import firestore
  • from firebase_admin import firestore

This worked for me. Try uninstalling and re-installing google-cloud-firestore

  1. Uninstall "google-cloud-firestore" using pip

       pip uninstall google-cloud-firestore
    
  2. Re-install it using pip again

       pip install google-cloud-firestore
    
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!