我正在尝试安装Tensorflow对象检测API,遵循这些指示。直到我不得不在模型/研究目录中运行python -m pip安装时,一切都很顺利。它开始收集和安装各种软件包,但当达到tf-型号官方安装时,会产生以下错误:
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和Python3.9.2。我也尝试使用Python3.7.12,但同样的错误仍然存在,而使用persisted手动安装tensorflow-addons表明没有找到匹配的发行版。
发布于 2022-02-05 14:57:49
Python-3.10.2-AMD 64:错误
python-3.9.10-amd64 64:好
Python3.9.2-AMD 64:好
Python3.8.10-AMD 64:好
python -m pip install --use-feature=2020-resolver tensorflow
“使用特性=2020-解析器”可能是一个很好的解决方案。
你用过"tensorflow==2.5.0“吗?
不要使用"==2.5.0“这样的特定版本。
更新
请参阅https://pypi.org/project/tensorflow/#history
tensorflow 2.8.0 (2022年2月3日)
我安装了tf 2.7.0,然后当我试图安装对象检测时,tf被重新安装到tf 2.8.0中。因此,我认为这很奇怪,但我不知道在尝试安装对象检测时TF-2.8.0还不存在。
如果再试一次,tf将自动重新安装到2.8.0中。
https://stackoverflow.com/questions/70869059
复制相似问题