Tensorflow安装出现dependency conflict错误
Python版本: 3.11.4
pip版本已升到最新
电脑上有mac的原装Python2.x,我装的3.11.4,还有个什么依赖的3.9
运行
pip3 install tensorflow
出现类似以下错误
(我报错的是另一个不是tensorflow—estimator,但基本就是这种错误,手太快直接关了窗口,这段是借用的别人的)
tensorflow 2.4.2 depends on tensorflow—estimator<2.5.0 and >=2.4.0
tensorflow 2.4.1 depends on tensorflow—estimator<2.5.0 and >=2.4.0
tensorflow 2.4.0 depends on tensorflow—estimator<2.5.0 and >=2.4.0rc0
tensorflow 2.3.3 depends on tensorflow—estimator<2.4.0 and >=2.3.0
tensorflow 2.3.2 depends on tensorflow—estimator<2.4.0 and >=2.3.0
tensorflow 2.3.1 depends on tensorflow—estimator<2.4.0 and >=2.3.0
tensorflow 2.3.0 depends on tensorflow—estimator<2.4.0 and >=2.3.0
tensorflow 2.2.3 depends on tensorflow—estimator<2.3.0 and >=2.2.0
tensorflow 2.2.2 depends on tensorflow—estimator<2.3.0 and >=2.2.0
tensorflow 2.2.1 depends on tensorflow—estimator<2.3.0 and >=2.2.0
tensorflow 2.2.0 depends on tensorflow—estimator<2.3.0 and >=2.2.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
最后通过运行以下命令解决
pip install tensorflow -i https://pypi.tuna.tsinghua.edu.cn/simple
成功安装tensorflow