Closed
Description
[REQUIRED] Step 2: Describe your environment
- Operating System version: amazonlinux Dockerfile
- Firebase SDK version: v2.12.0
- Library version: v2.12.0
- Firebase Product: firestore
[REQUIRED] Step 3: Describe the problem
pip install doesn't appear to install all transitive dependencies. As a result I'm getting missing module errors when I from firebase_admin import firestore
Traceback (most recent call last):
File "lib/firebase_admin/firestore.py", line 22, in <module>
from google.cloud import firestore # pylint: disable=import-error,no-name-in-module
File "lib/google/cloud/firestore.py", line 18, in <module>
from google.cloud.firestore_v1beta1 import __version__
File "lib/google/cloud/firestore_v1beta1/__init__.py", line 20, in <module>
from google.cloud.firestore_v1beta1 import types
File "lib/google/cloud/firestore_v1beta1/types.py", line 18, in <module>
from google.api_core.protobuf_helpers import get_messages
File "lib/google/api_core/protobuf_helpers.py", line 21, in <module>
from google.protobuf import field_mask_pb2
ModuleNotFoundError: No module named 'google.protobuf'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "main.py", line 4, in <module>
from firebase_admin import firestore
File "lib/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.
Steps to reproduce:
I've created a dockerized reproduction of the problem:
- git clone https://github.com/FreakTheMighty/FirestoreImportIssue.git
- docker-compose run lambda bash test.sh
- Note the traceback
Relevant Code:
from firebase_admin import firestore
Metadata
Metadata
Assignees
Labels
No labels