我正在嘗試在我的 python django 項目中使用 firebase。這是在使用 Visual Studio 的 Windows 機器上。當我嘗試導入時,出現錯誤“無法導入適用于 Python 的 Cloud Firestore 庫”:import firebase_admin
from firebase_admin import firestore我已經嘗試了通過谷歌可以找到的所有內容,包括:手動安裝grpcio將 protobuff 降級到各種版本。實際上,這最終會出現不同的錯誤,具體取決于我使用的 protobuff 版本。卸載并重新安裝 google-cloud-store 和所有其他依賴項重新安裝并升級pip當天發生的其他一些小事我記不清了。經過一整天的努力后,我陷入了死胡同。還有其他解決方案,甚至是尋找方向嗎?這是已安裝的軟件包列表:CacheControl 0.12.6cachetools 4.1.1certifi 2020.6.20cffi 1.14.2chardet 3.0.4defusedxml 0.6.0diff-match-patch 20200713Django 2.2.16django-import-export 2.3.0docutils 0.16et-xmlfile 1.0.1firebase-admin 4.3.0google-api-core 1.22.2google-api-python-client 1.12.1google-auth 1.21.1google-auth-httplib2 0.0.4google-cloud-core 1.4.1google-cloud-firestore 1.9.0google-cloud-storage 1.31.0google-crc32c 1.0.0google-resumable-media 1.0.0googleapis-common-protos 1.52.0grpcio 1.32.0httplib2 0.18.1idna 2.10jdcal 1.4.1MarkupPy 1.14msgpack 1.0.0mysql-connector-python 8.0.21odfpy 1.4.1openpyxl 3.0.5pip 20.2.3protobuf 3.13.0pyasn1 0.4.8pyasn1-modules 0.2.8pycparser 2.20pytz 2020.1PyYAML 5.3.1requests 2.24.0rsa 4.6不知道是否值得注意,但是當我嘗試像另一篇文章推薦的那樣進行導入時:import osimport firebase_adminfrom google.cloud import firestorefrom firebase_admin import firestore相反,我得到“DLL 加載失?。赫也坏街付ǖ倪^程?!?在描述符.py 中為“rom google.protobuf.pyext import _message”。我不知道它是否相關,但認為 id 包含該信息。
添加回答
舉報
0/150
提交
取消