我试图在python中的raspberry pi上安装firebase,但是没有找到一个防火墙模型,但我已经安装了它,问题是安装在我的笔记本上是可行的,但是当我尝试在Raspberry pi 4上安装它时,它一直存在错误。
File "6_webcam_live_recognition.py", line 7, in <module>
from firebase_admin import firestore
File "/home/pi/iSight/iSight-env/lib/python3.7/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.这是我的需求文件夹,它被更新了。
asn1crypto==0.24.0
astroid==2.1.0
asttokens==1.1.13
automationhat==0.2.0
backcall==0.2.0
backports.entry-points-selectable==1.1.0
beautifulsoup4==4.7.1
bleach==4.1.0
blinker==1.4
blinkt==0.1.2
bottle==0.12.19
bottle-cors==0.1.5
buttonshim==0.0.2
CacheControl==0.12.10
cached-property==1.5.2
cachetools==4.2.4
Cap1xxx==0.1.3
certifi==2018.8.24
cffi==1.15.0
chardet==3.0.4
charset-normalizer==2.0.9
Click==7.0
cmake==3.21.4
colorama==0.4.4
colorzero==2.0
configparser==3.5.0b2
cookies==2.2.1
cryptography==2.6.1
cupshelpers==1.0
cycler==0.10.0
cygrpc==1.0.4.post6
Cython==0.29.2
decorator==4.3.0
distlib==0.3.3
dlib==19.22.1
docutils==0.14
drumhat==0.1.0
entrypoints==0.3
enum34==1.1.6
envirophat==1.0.0
ExplorerHAT==0.4.2
ez-setup==0.9
face-recognition==1.3.0
face-recognition-models==0.3.0
filelock==3.3.1
firebase-admin==5.1.0
firestore==0.0.8
Flask==1.0.2
fourletterphat==0.1.0
funcsigs==1.0.2
gcloud==0.18.3
glibc==0.6.1
google-api-core==2.2.2
google-api-python-client==2.32.0
google-auth==2.3.3
google-auth-httplib2==0.1.0
google-auth-oauthlib==0.4.6
google-cloud==0.34.0
google-cloud-appengine-logging==1.1.0
google-cloud-audit-log==0.2.0
google-cloud-bigquery==2.31.0
google-cloud-bigquery-storage==2.10.1
google-cloud-bigtable==2.4.0
google-cloud-core==2.2.1
google-cloud-datastore==2.4.0
google-cloud-firestore==2.3.4
google-cloud-language==2.3.1
google-cloud-logging==2.7.0
google-cloud-pubsub==2.9.0
google-cloud-resource-manager==1.3.3
google-cloud-scheduler==2.5.0
google-cloud-secret-manager==2.8.0
google-cloud-spanner==3.12.0
google-cloud-storage==1.43.0
google-crc32c==1.3.0
google-resumable-media==2.1.0
googleapis-common-protos==1.53.0
gpiozero==1.6.2
grpc-google-iam-v1==0.12.3
grpcio==1.42.0
grpcio-status==1.42.0
grpcio-tools==1.23.0
h5py==3.4.0
html5lib==1.0.1
httplib2==0.20.2
idna==2.6
imageio==2.9.0
importlib-metadata==4.8.1
imutils==0.5.4
install==1.3.5
ipaddress==1.0.17
ipython==7.29.0
iso8601==1.0.2
isort==4.3.4
itsdangerous==0.24
jedi==0.18.0
Jinja2==2.10
jws==0.1.3
keyring==17.1.1
keyrings.alt==3.1.1
kiwisolver==1.3.2
lazy-object-proxy==1.3.1
libcst==0.3.23
logilab-common==1.4.2
lxml==4.3.2
MarkupSafe==1.1.0
matplotlib==3.4.3
matplotlib-inline==0.1.3
mccabe==0.6.1
microdotphat==0.2.1
mock==2.0.0
mote==0.0.4
motephat==0.0.3
msgpack==1.0.3
mypy==0.670
mypy-extensions==0.4.1
networkx==2.6.3
numpy==1.21.4
oauth2client==4.1.3
oauthlib==2.1.0
olefile==0.46
opencv-contrib-python==4.1.0.25
opencv-python==4.5.4.60
packaging==21.3
pantilthat==0.0.7
parso==0.8.2
Paste==3.5.0
pbr==4.2.0
pexpect==4.6.0
pgzero==1.2
phatbeat==0.1.1
pianohat==0.1.0
picamera==1.13
pickleshare==0.7.5
piglow==1.2.5
pigpio==1.78
Pillow==8.4.0
pkg-resources==0.0.0
pkginfo==1.8.2
platformdirs==2.4.0
prompt-toolkit==3.0.21
proto-plus==1.19.8
protobuf==3.19.1
psutil==5.5.1
pyasn1==0.4.8
pyasn1-modules==0.2.8
pybind11==2.8.0
pycairo==1.20.1
pycparser==2.20
pycrypto==2.6.1
pycryptodome==3.12.0
pycups==1.9.73
pygame==1.9.4.post1
Pygments==2.10.0
PyGObject==3.30.4
pyinotify==0.9.6
PyJWT==1.7.0
pylint==2.2.2
pyOpenSSL==19.0.0
pyparsing==2.4.7
Pyrebase==3.0.27
Pyrebase4==4.5.0
pyserial==3.4
pysmbc==1.0.15.6
pytesseract==0.3.8
python-apt==1.8.4.3
python-dateutil==2.8.2
python-firebase==1.2
python-jwt==2.0.1
pytz==2021.3
PyWavelets==1.1.1
pyxdg==0.25
PyYAML==6.0
rainbowhat==0.1.0
readme-renderer==30.0
reportlab==3.5.13
requests==2.26.0
requests-oauthlib==1.0.0
requests-toolbelt==0.9.1
responses==0.9.0
rfc3986==1.5.0
roman==2.0.0
RPi.GPIO==0.7.0
rsa==4.8
scikit-image==0.18.3
scipy==1.7.1
scrollphat==0.0.7
scrollphathd==1.2.1
SecretStorage==2.3.1
Send2Trash==1.5.0
simplejson==3.16.0
six==1.16.0
skywriter==0.0.7
sn3218==1.2.7
soupsieve==1.8
spidev==3.5
sqlparse==0.4.2
ssh-import-id==5.7
stevedore==3.5.0
tflite-runtime==2.5.0.post1
thonny==3.3.10
tifffile==2021.10.12
touchphat==0.0.1
tqdm==4.62.3
traitlets==5.1.1
twine==3.7.0
twython==3.7.0
typed-ast==1.3.1
typing-extensions==3.10.0.2
typing-inspect==0.7.1
unicornhathd==0.0.4
uritemplate==3.0.1
urllib3==1.24.1
virtualenv==20.8.1
virtualenv-clone==0.5.7
virtualenvwrapper==4.8.4
watchdog==2.1.6
wcwidth==0.2.5
webencodings==0.5.1
websockets==10.0
Werkzeug==0.14.1
wrapt==1.10.11
zipp==3.6.0请任何人都能帮我,我被困住了
发布于 2021-12-05 19:46:47
尝试将google-cloud-firestore==2.3.4添加到您的需求文件并重新安装。看来google-cloud-firestore不见了。
https://pypi.org/project/google-cloud-firestore/
如果它不能工作,也尝试添加grpcio==1.42.0,它是由gcloud防火墙使用的。
发布于 2022-09-11 02:44:06
同样的问题:将Raspberry pi 4的数据发送到firebase防火墙
RPi 4B与Raspberry,所以v10 (buster)和Python3.7.3与Firebase模块不兼容。请参见:
$ python3 my_firestore_script.py
...
ImportError: /lib/arm-linux-gnueabihf/libm.so.6: version `GLIBC_2.29' not found (required by ...)
ImportError: Failed to import the Cloud Firestore library for Python. Make sure to install the "google-cloud-firestore" module.运行下面的命令可以确认GLIBC在2.28版(而不是使用firebase-admin Python模块的脚本所要求的2.29版本)。
$ ldd --version
ldd (Debian GLIBC 2.28-10+rpt2+rpi1+deb10u1) 2.28解决方案:安装一个较新的Python版本,并将grpcio模块降级(从1.48版降至1.44版)。见这里。
安装一个较新的Python版本。建议: 3.10.4。如何操作:https://allurcode.com/install-latest-version-of-python-on-raspberry-pi/
使用最近安装的Python版本,安装firebase-admin模块。
$ /usr/local/bin/pip3.10 install firebase-admin检查当前版本的grpcio安装模块。
$ /usr/local/bin/pip3.10 list | grep grpcio
grpcio 1.48.1卸载并安装其他版本。耐心点,因为安装至少需要20分钟。
$ /usr/local/bin/pip3.10 uninstall grpcio
$ /usr/local/bin/pip3.10 uninstall grpcio-status
$ /usr/local/bin/pip3.10 install grpcio==1.44.0 --no-binary=grpcio再次检查已安装的模块列表。
$ /usr/local/bin/pip3.10 list | grep grpcio
grpcio 1.44.0再次尝试脚本执行。
$ python3 my_firestore_script.py现在,脚本执行起来就像一种魅力。
https://stackoverflow.com/questions/70237934
复制相似问题