栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

安装tensorflow时,protobuf requires Python ‘>=3.7‘ but the running Python is 2.7的解决方法

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

安装tensorflow时,protobuf requires Python ‘>=3.7‘ but the running Python is 2.7的解决方法

由于ROS中默认使用的是Python2,想要在ROS中使用Tensorflow,所以在Python2中安装了Tensorflow1.14.0,安装时可能会出现protobuf requires Python ‘>=3.7‘ but the running Python is 2.7的问题,这里并不是代表Python2就不能安装,而是pip的问题。

解决方案

输入命令:python -m pip install --upgrade pip
更新完之后,再利用命令pip install tensorflow==1.14.0来安装。

Protobuf

安装Tensorflow版本与Protobuf版本经常容易出现不匹配的问题,我这里经过实验多次,发现Tensorflow的1.14.0版本与Protobuf的3.17.3版本能够匹配,可以先安装protobuf指定版本。如果已经安装了protobuf的其他版本,可以使用pip uninstall protobuf先卸载,再使用pip install protobuf==3.17.3来安装。
具体的tensorflow安装流程可以参考这篇文章https://blog.csdn.net/qq_44642372/article/details/121809115
参考:https://blog.csdn.net/LucyGill/article/details/125268665

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/998132.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号