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

相关推荐
小关会打代码4 分钟前
关于Pycharm中在运行出现语法错误:Non-UTF-8 code starting with
ide·python·pycharm
用户3721574261355 分钟前
Python 高效将 PDF 转换为 HTML 的实用指南
python
深栈6 分钟前
机器学习:编码方式
人工智能·python·机器学习·编码
yzx99101310 分钟前
Django 搭配数据库开发智慧园区系统全攻略
python·django·数据库开发
PixelMind19 分钟前
【LLIE技术专题】 SCI代码讲解
图像处理·python·低照度图像增强·llie
天才测试猿41 分钟前
Python常用自动化测试框架—Pytest详解
自动化测试·软件测试·python·测试工具·职场和发展·测试用例·pytest
胡耀超1 小时前
2、CPU深度解析:从微架构到性能优化
python·性能优化·架构·arm·cpu·x86·多核心
en-route1 小时前
使用 Flask 构建 Web 应用:静态页面与动态 API 访问
前端·python·flask
ZeroNews内网穿透1 小时前
新版发布!“零讯”微信小程序版本更新
运维·服务器·网络·python·安全·微信小程序·小程序
hrrrrb3 小时前
【Python】文件处理(二)
开发语言·python