【问题标题】:Error while installing TF Object Detection API安装 TF 对象检测 API 时出错
【发布时间】:2022-01-26 19:17:19
【问题描述】:

我正在尝试按照those instructions 安装 Tensorflow 对象检测 API。一切都很顺利,直到我必须在模型/研究目录中运行 python -m pip install 。它开始收集和安装各种包,但是当它到达 tf-models-official 的安装时,它会产生以下错误:

ERROR: Cannot install object-detection because these package versions have conflicting dependencies.

The conflict is caused by:
    tf-models-official 2.7.0 depends on tensorflow-addons
    tf-models-official 2.6.1 depends on tensorflow-addons
    tf-models-official 2.6.0 depends on tensorflow-addons
    tf-models-official 2.5.1 depends on tensorflow-addons

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

我在网上做了一些挖掘,但在 tensorflow 或其他网站的 Github 存储库中没有找到任何东西。我在 Linux 64 位操作系统上使用 Tensorflow 2.7.0 和 Python 3.9.2。我也尝试过使用 Python 3.7.12,但同样的错误仍然存​​在,而使用 pip install 手动安装 tensorflow-addons 表明没有找到匹配的发行版。

【问题讨论】:

    标签: python linux tensorflow


    【解决方案1】:

    python-3.10.2-amd64:错误

    python-3.9.10-amd64: 好的

    python-3.9.2-amd64:好的

    python-3.8.10-amd64:好的


    python -m pip install --use-feature=2020-resolver tensorflow

    '--use-feature=2020-resolver' 可能是一个很好的解决方案。


    你用过“tensorflow==2.5.0”吗?

    不要使用特定版本,例如“==2.5.0”。


    更新

    https://pypi.org/project/tensorflow/#history

    张量流 2.8.0(2022 年 2 月 3 日)

    我安装了 tf 2.7.0,然后当我尝试安装对象检测时,tf 被重新安装到 tf 2.8.0 中。所以我觉得这很奇怪,但是当您尝试安装对象检测时,我不知道 tf 2.8.0 还不存在。

    如果您再试一次,tf 将自动重新安装到 2.8.0。

    【讨论】:

    • 你的意思是python-3.9.2中的错误吗?
    • 正如目前所写,您的答案尚不清楚。请edit 添加其他详细信息,以帮助其他人了解这如何解决所提出的问题。你可以找到更多关于如何写好答案的信息in the help center
    • @DrSpill python-3.9.2 没有错误。
    猜你喜欢
    • 2020-07-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-07-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-10-15
    相关资源
    最近更新 更多