【问题标题】:Trying to connect firebase to my project but installing error in pyrebase and import pyrebase error尝试将 firebase 连接到我的项目,但在 pyrebase 中安装错误并导入 pyrebase 错误
【发布时间】:2021-04-01 19:08:35
【问题描述】:

我正在尝试使用 python firebase.google.com 并将我的项目连接到我的 python 文件我根据文档安装了 pyrebase4 我已经完成了一切

我遇到过很多问题,比如

在 python 文件中导入 pyrebase 时出现类似错误

其次,当尝试安装 pyrebase 时出现类似

的错误
Installation error with pycryptodome
(and a lots of line with after this )

github有人提供指导

pip install pyrebase4
pip install pyrebase-t
pip install pycryptodome

但 pycryptodome 也成功安装,但出现错误

pip install pyrebase-t

出现类似错误

Attempting uninstall: requests
    Found existing installation: requests 2.11.1
    Uninstalling requests-2.11.1:
      Successfully uninstalled requests-2.11.1
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. 
This behaviour is the source of the following dependency conflicts.
pyrebase4 4.4.3 requires oauth2client>=4.1.2, but you have oauth2client 3.0.0 which is incompatible.       
pyrebase-t 1.0.28 requires requests==2.11.1, but you have requests 2.25.1 which is incompatible.
Successfully installed requests-2.25.1

【问题讨论】:

  • 在卸载 pyrebase-t 后再次显示不同的错误,例如 AttributeError: module 'pyrebase' has no attribute 'initialize_app'

标签: python firebase python-requests virtualenv pyrebase


【解决方案1】:

首先通过运行此命令卸载pyrebasepyrebase4pyrebase-tpycryptodome

pip uninstall pyrebase, pyrebase4, pyrebase-t, pycryptodome

然后通过运行以下命令重新安装pycryptodome

pip install pycryptodome

然后通过运行以下命令安装pyrebase4

pip install pyrebase4

希望这能解决我的问题。

【讨论】:

    猜你喜欢
    • 2022-11-09
    • 1970-01-01
    • 2018-02-18
    • 2021-03-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-08-19
    • 2022-12-12
    相关资源
    最近更新 更多