无法将tensorflowjs从3.18更新到4.18

问题描述 投票:0回答:1

我尝试更新时出现错误

ERROR: Cannot install tensorflowjs and tensorflowjs==4.18.0 because these package versions have conflicting dependencies.

The conflict is caused by:
    tensorflowjs 4.18.0 depends on tensorflow<3 and >=2.13.0
    tensorflow-decision-forests 1.8.1 depends on tensorflow~=2.15.0

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

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

然后当我尝试安装tensorflow-decision-forests 1.8.1时

Collecting tensorflow-decision-forests
  Using cached tensorflow_decision_forests-1.8.1.tar.gz (15.2 MB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy in c:\python312\lib\site-packages (from tensorflow-decision-forests) (1.26.4)
Requirement already satisfied: pandas in c:\python312\lib\site-packages (from tensorflow-decision-forests) (2.2.0)
INFO: pip is looking at multiple versions of tensorflow-decision-forests to determine which version is compatible with other requirements. This could take a while.
ERROR: Could not find a version that satisfies the requirement tensorflow~=2.15.0 (from tensorflow-decision-forests) (from versions: 2.16.0rc0, 2.16.1)
ERROR: No matching distribution found for tensorflow~=2.15.0

名称:张量流 版本:2.16.1 简介:TensorFlow 是一个适合所有人的开源机器学习框架。 主页:https://www.tensorflow.org/ 作者:谷歌公司 作者电子邮件:[电子邮件受保护] 许可证:Apache 2.0 位置:C:\Python312\Lib\site-packages 需要:tensorflow-intel 必需者:tensorflowjs

我的tensorflow版本已经是2.16.1

python tensorflow pip
1个回答
0
投票

无法安装

decision-forest
的根本原因在错误消息中:

ERROR: Could not find a version that satisfies the requirement tensorflow~=2.15.0 (from tensorflow-decision-forests) (from versions: 2.16.0rc0, 2.16.1)

它需要

tensorflow~=2.15.0
,而tensorflow 2.16不满足。
~=
表示“兼容版本”。

你可能会问“那为什么不安装tensforflow 2.15呢?”答案是:因为无法安装,这也在同一条错误消息中:

from versions: 2.16.0rc0, 2.16.1
。只有
2.16.0rc0, 2.16.1
版本的 TensorFlow 与您的 Python 版本/操作系统组合兼容。

这又是因为您使用的是 python 3.12,它相当新,并且仅在 Windows 上最新版本的 Tensorflow 中受支持。如果你绝对需要更高版本的

tensorflowjs
,你需要降级你的python版本

© www.soinside.com 2019 - 2024. All rights reserved.