0

I'm running python 3.9 with all firebase-admin and firestore modules installed. When trying to run my code importing firestore its giving an error. I have tried the same on my Mac and it works perfectly fine.

This is the error:

Traceback (most recent call last):
  File "/home/pi/.local/lib/python3.9/site-packages/firebase_admin/firestore.py", line 22, in <module>
    from google.cloud import firestore # pylint: disable=import-error,no-name-in-module
  File "/home/pi/.local/lib/python3.9/site-packages/google/cloud/firestore.py", line 18, in <module>
    from google.cloud.firestore_v1 import __version__
  File "/home/pi/.local/lib/python3.9/site-packages/google/cloud/firestore_v1/__init__.py", line 30, in <module>
    from google.cloud.firestore_v1._helpers import GeoPoint
  File "/home/pi/.local/lib/python3.9/site-packages/google/cloud/firestore_v1/_helpers.py", line 22, in <module>
    from google.api_core import gapic_v1  # type: ignore
  File "/home/pi/.local/lib/python3.9/site-packages/google/api_core/gapic_v1/__init__.py", line 16, in <module>
    from google.api_core.gapic_v1 import config
  File "/home/pi/.local/lib/python3.9/site-packages/google/api_core/gapic_v1/config.py", line 23, in <module>
    import grpc
  File "/home/pi/.local/lib/python3.9/site-packages/grpc/__init__.py", line 22, in <module>
    from grpc import _compression
  File "/home/pi/.local/lib/python3.9/site-packages/grpc/_compression.py", line 15, in <module>
    from grpc._cython import cygrpc
ImportError: /home/pi/.local/lib/python3.9/site-packages/grpc/_cython/cygrpc.cpython-39-arm-linux-gnueabihf.so: undefined symbol: __atomic_exchange_8

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/pi/Desktop/smartgate/smartgate.py", line 3, in <module>
    from firebase_admin import firestore
  File "/home/pi/.local/lib/python3.9/site-packages/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.
Epsi95
  • 8,420
  • 1
  • 12
  • 30
  • 1
    please check https://stackoverflow.com/questions/48264536/importerror-failed-to-import-the-cloud-firestore-library-for-python – Epsi95 Nov 27 '21 at 14:09

0 Answers0