Я пытаюсь использовать библиотеки Python администратора Firebase. Однако когда я пытаюсь импортировать библиотеку, используя:
from firebase_admin import firestore
Я получаю следующую ошибку:
Traceback (most recent call last):
File "", line 1, in
File "/Users/mnjuhn/Library/Python/3.8/lib/python/site-packages/firebase_admin/firestore.py", line 27, in
from google.cloud import firestore
File "/Users/mnjuhn/Library/Python/3.8/lib/python/site-packages/google/cloud/firestore/__init__.py", line 18, in
from google.cloud.firestore_v1 import gapic_version as package_version
File "/Users/mnjuhn/Library/Python/3.8/lib/python/site-packages/google/cloud/firestore_v1/__init__.py", line 37, in
from google.cloud.firestore_v1.async_client import AsyncClient
File "/Users/mnjuhn/Library/Python/3.8/lib/python/site-packages/google/cloud/firestore_v1/async_client.py", line 43, in
from google.cloud.firestore_v1.services.firestore import (
File "/Users/mnjuhn/Library/Python/3.8/lib/python/site-packages/google/cloud/firestore_v1/services/firestore/__init__.py", line 16, in
from .client import FirestoreClient
File "/Users/mnjuhn/Library/Python/3.8/lib/python/site-packages/google/cloud/firestore_v1/services/firestore/client.py", line 62, in
from google.cloud.location import locations_pb2 # type: ignore
File "/Users/mnjuhn/Library/Python/3.8/lib/python/site-packages/google/cloud/location/locations_pb2.py", line 30, in
from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/google/api/annotations_pb2.py", line 42, in
google_dot_protobuf_dot_descriptor__pb2.MethodOptions.RegisterExtension(http)
AttributeError: type object 'MethodOptions' has no attribute 'RegisterExtension'
>>>
Моя версия Python — 3.8.2, и у меня установлены следующие библиотеки:
ВНИМАНИЕ: pip вызывается старой оболочкой скрипта. В будущей версии pip это не удастся.
Пожалуйста, посетите https://github.com/pypa/pip/issues/5599, чтобы получить советы по устранению основной проблемы.
Чтобы избежать этой проблемы, вы можете вызвать Python с '-m pip' вместо прямого запуска pip.
------------------------ ----------
CacheControl 0.14.1
cachetools 4.0.0
certifi 2019.11.28
cffi 1.17.1
chardet 3.0.4
cryptography 43.0.3
firebase 4.0.1
firebase-admin 6.6.0
google-api-core 2.22.0
google-api-python-client 1.7.11
google-auth 2.36.0
google-auth-httplib2 0.0.3
google-cloud-core 2.4.1
google-cloud-firestore 2.19.0
google-cloud-storage 2.18.2
google-crc32c 1.5.0
google-resumable-media 2.7.2
googleapis-common-protos 1.65.0
grpcio 1.67.1
grpcio-status 1.67.1
httplib2 0.17.0
idna 2.9
msgpack 1.0.0
pip 24.3.1
proto-plus 1.25.0
protobuf 5.28.3
pyasn1 0.4.8
pyasn1-modules 0.2.8
pycparser 2.22
PyJWT 2.9.0
pytz 2019.3
requests 2.23.0
rsa 4.0
setuptools 41.2.0
six 1.14.0
uritemplate 3.0.1
urllib3 1.25.8
wheel 0.45.0
Подробнее здесь: https://stackoverflow.com/questions/791 ... on-library
Невозможно импортировать администратора Firebase в библиотеку Python ⇐ Python
Программы на Python
1731257959
Anonymous
Я пытаюсь использовать библиотеки Python администратора Firebase. Однако когда я пытаюсь импортировать библиотеку, используя:
from firebase_admin import firestore
Я получаю следующую ошибку:
Traceback (most recent call last):
File "", line 1, in
File "/Users/mnjuhn/Library/Python/3.8/lib/python/site-packages/firebase_admin/firestore.py", line 27, in
from google.cloud import firestore
File "/Users/mnjuhn/Library/Python/3.8/lib/python/site-packages/google/cloud/firestore/__init__.py", line 18, in
from google.cloud.firestore_v1 import gapic_version as package_version
File "/Users/mnjuhn/Library/Python/3.8/lib/python/site-packages/google/cloud/firestore_v1/__init__.py", line 37, in
from google.cloud.firestore_v1.async_client import AsyncClient
File "/Users/mnjuhn/Library/Python/3.8/lib/python/site-packages/google/cloud/firestore_v1/async_client.py", line 43, in
from google.cloud.firestore_v1.services.firestore import (
File "/Users/mnjuhn/Library/Python/3.8/lib/python/site-packages/google/cloud/firestore_v1/services/firestore/__init__.py", line 16, in
from .client import FirestoreClient
File "/Users/mnjuhn/Library/Python/3.8/lib/python/site-packages/google/cloud/firestore_v1/services/firestore/client.py", line 62, in
from google.cloud.location import locations_pb2 # type: ignore
File "/Users/mnjuhn/Library/Python/3.8/lib/python/site-packages/google/cloud/location/locations_pb2.py", line 30, in
from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/google/api/annotations_pb2.py", line 42, in
google_dot_protobuf_dot_descriptor__pb2.MethodOptions.RegisterExtension(http)
AttributeError: type object 'MethodOptions' has no attribute 'RegisterExtension'
>>>
Моя версия Python — 3.8.2, и у меня установлены следующие библиотеки:
ВНИМАНИЕ: pip вызывается старой оболочкой скрипта. В будущей версии pip это не удастся.
Пожалуйста, посетите https://github.com/pypa/pip/issues/5599, чтобы получить советы по устранению основной проблемы.
Чтобы избежать этой проблемы, вы можете вызвать Python с '-m pip' вместо прямого запуска pip.
------------------------ ----------
CacheControl 0.14.1
cachetools 4.0.0
certifi 2019.11.28
cffi 1.17.1
chardet 3.0.4
cryptography 43.0.3
firebase 4.0.1
firebase-admin 6.6.0
google-api-core 2.22.0
google-api-python-client 1.7.11
google-auth 2.36.0
google-auth-httplib2 0.0.3
google-cloud-core 2.4.1
google-cloud-firestore 2.19.0
google-cloud-storage 2.18.2
google-crc32c 1.5.0
google-resumable-media 2.7.2
googleapis-common-protos 1.65.0
grpcio 1.67.1
grpcio-status 1.67.1
httplib2 0.17.0
idna 2.9
msgpack 1.0.0
pip 24.3.1
proto-plus 1.25.0
protobuf 5.28.3
pyasn1 0.4.8
pyasn1-modules 0.2.8
pycparser 2.22
PyJWT 2.9.0
pytz 2019.3
requests 2.23.0
rsa 4.0
setuptools 41.2.0
six 1.14.0
uritemplate 3.0.1
urllib3 1.25.8
wheel 0.45.0
Подробнее здесь: [url]https://stackoverflow.com/questions/79175335/unable-to-import-firebase-admin-in-python-library[/url]
Ответить
1 сообщение
• Страница 1 из 1
Перейти
- Кемерово-IT
- ↳ Javascript
- ↳ C#
- ↳ JAVA
- ↳ Elasticsearch aggregation
- ↳ Python
- ↳ Php
- ↳ Android
- ↳ Html
- ↳ Jquery
- ↳ C++
- ↳ IOS
- ↳ CSS
- ↳ Excel
- ↳ Linux
- ↳ Apache
- ↳ MySql
- Детский мир
- Для души
- ↳ Музыкальные инструменты даром
- ↳ Печатная продукция даром
- Внешняя красота и здоровье
- ↳ Одежда и обувь для взрослых даром
- ↳ Товары для здоровья
- ↳ Физкультура и спорт
- Техника - даром!
- ↳ Автомобилистам
- ↳ Компьютерная техника
- ↳ Плиты: газовые и электрические
- ↳ Холодильники
- ↳ Стиральные машины
- ↳ Телевизоры
- ↳ Телефоны, смартфоны, плашеты
- ↳ Швейные машинки
- ↳ Прочая электроника и техника
- ↳ Фототехника
- Ремонт и интерьер
- ↳ Стройматериалы, инструмент
- ↳ Мебель и предметы интерьера даром
- ↳ Cантехника
- Другие темы
- ↳ Разное даром
- ↳ Давай меняться!
- ↳ Отдам\возьму за копеечку
- ↳ Работа и подработка в Кемерове
- ↳ Давай с тобой поговорим...
Мобильная версия