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