firebase / firebase-admin-python

Firebase Admin Python SDK
https://firebase.google.com/docs/admin/setup
Apache License 2.0
1.02k stars 312 forks source link

importing firestore keeps giving error version `GLIBC_2.33' not found #606

Closed subham9777 closed 2 years ago

subham9777 commented 2 years ago

Hello,

I have been using firestore for a lot of projects and recently i have started facing this issue when i started using firestore on a raspberry pi. I have a very generic setup of pi with raspbian buster on a raspberry pi 4. i have created a virtual environment and when i do a from firebase_admin import firestore i get a Traceback error which is this:

Traceback (most recent call last): File "/home/pi/venv/lib/python3.7/site-packages/firebase_admin/firestore.py", line 22, in from google.cloud import firestore # pylint: disable=import-error,no-name-in-module File "/home/pi/venv/lib/python3.7/site-packages/google/cloud/firestore.py", line 18, in from google.cloud.firestore_v1 import version File "/home/pi/venv/lib/python3.7/site-packages/google/cloud/firestore_v1/init.py", line 30, in from google.cloud.firestore_v1._helpers import GeoPoint File "/home/pi/venv/lib/python3.7/site-packages/google/cloud/firestore_v1/_helpers.py", line 22, in from google.api_core import gapic_v1 # type: ignore File "/home/pi/venv/lib/python3.7/site-packages/google/api_core/gapic_v1/init.py", line 16, in from google.api_core.gapic_v1 import config File "/home/pi/venv/lib/python3.7/site-packages/google/api_core/gapic_v1/config.py", line 23, in import grpc File "/home/pi/venv/lib/python3.7/site-packages/grpc/init.py", line 22, in from grpc import _compression File "/home/pi/venv/lib/python3.7/site-packages/grpc/_compression.py", line 15, in from grpc._cython import cygrpc ImportError: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.33' not found (required by /home/pi/venv/lib/python3.7/site-packages/grpc/_cython/cygrpc.cpython-37m-arm-linux-gnueabihf.so)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "", line 1, in File "/home/pi/venv/lib/python3.7/site-packages/firebase_admin/firestore.py", line 28, in 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.

The important thing to note is if i run the script outside the envrironment it works perfectly without any issue. My application needs to be run in an environment so i can't move away from it. Any help is appreciated

Thanks

google-oss-bot commented 2 years ago

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

lahirumaramba commented 2 years ago

Raspberry pi is not a platform that we official support, but looking at the error logs it looks like the glibc on your system is not compatible with what grpcio (required by google-cloud-firestore) is looking for. You should be able to find out what your glibc version is by running ldd --version. If the current glibc is outdated try updating your system. I also came across this on grpcio. Hope this helps. In the future, please use Stack Overflow for usage questions. Thanks.