报错信息:

[libprotobuf FATAL google/protobuf/src/google/protobuf/stubs/common.cc:67] This program requires version 3.6.1 of the Protocol Buffer runtime library, but the installed version is 3.0.0.  Please update your library.  If you compiled the program yourself, make sure that your headers are from the same version of Protocol Buffers as your link-time library.  (Version verification failed in "google/protobuf/descriptor.pb.cc".)
terminate called after throwing an instance of 'google::protobuf::FatalException'
what(): This program requires version 3.6.1 of the Protocol Buffer runtime library, but the installed version is 3.0.0. Please update your library. If you compiled the program yourself, make sure that your headers are from the same version of Protocol Buffers as your link-time library. (Version verification failed in "google/protobuf/descriptor.pb.cc".)
Aborted

问题原因:

TensorFlow和protobuf版本不匹配

解决一:版本降级

先卸载

pip uninstall protobuf

再安装

pip install protobuf==2.6.1

如果版本降级后报"TypeError: __init__() got an unexpected keyword argument 'syntax' "的错误,错误详情如下:

Traceback (most recent call last):
File "helloworld.py", line 10, in <module>
import tensorflow as tf
File "/usr/lib/python2.7/site-packages/tensorflow/__init__.py", line 28, in <module>
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "/usr/lib/python2.7/site-packages/tensorflow/python/__init__.py", line 49, in <module>
from tensorflow.core.framework.graph_pb2 import *
File "/usr/lib/python2.7/site-packages/tensorflow/core/framework/graph_pb2.py", line 16, in <module>
from tensorflow.core.framework import attr_value_pb2 as tensorflow_dot_core_dot_framework_dot_attr__value__pb2
File "/usr/lib/python2.7/site-packages/tensorflow/core/framework/attr_value_pb2.py", line 16, in <module>
from tensorflow.core.framework import tensor_pb2 as tensorflow_dot_core_dot_framework_dot_tensor__pb2
File "/usr/lib/python2.7/site-packages/tensorflow/core/framework/tensor_pb2.py", line 16, in <module>
from tensorflow.core.framework import tensor_shape_pb2 as tensorflow_dot_core_dot_framework_dot_tensor__shape__pb2
File "/usr/lib/python2.7/site-packages/tensorflow/core/framework/tensor_shape_pb2.py", line 22, in <module>
serialized_pb=_b('\n,tensorflow/core/framework/tensor_shape.proto\x12\ntensorflow\"z\n\x10TensorShapeProto\x12-\n\x03\x64im\x18\x02 \x03(\x0b\x32 .tensorflow.TensorShapeProto.Dim\x12\x14\n\x0cunknown_rank\x18\x03 \x01(\x08\x1a!\n\x03\x44im\x12\x0c\n\x04size\x18\x01 \x01(\x03\x12\x0c\n\x04name\x18\x02 \x01(\tB/\n\x18org.tensorflow.frameworkB\x11TensorShapeProtosP\x01\x62\x06proto3')
TypeError: __init__() got an unexpected keyword argument 'syntax'

还有一个办法,就是升级TensorFlow的版本,把TensorFlow的版本更新成最近版本

解决二:TensorFlow版本升级

把protobuf卸载

pip uninstall protobuf

安装protobuf

pip install 'protobuf>=3.0.0a3'

升级TensorFlow

pip install --upgrade tensorflow

运行TensorFlow报错,“This program requires version 3.6.1 of the Protocol Buffer runtime library, but the installed version is 3.0.0.”的更多相关文章

  1. DosBox 报错 this program requires dosxnt.exe to be in your path

    也就是少了dosxnt.exe文件,能够上网搜索下载,把dosxnt 拷贝到你挂截文件夹下就能够执行 Dosxnt文件下载

  2. Tensorflow 报错:tensorflow.python.framework.errors_impl.InternalError: Failed to create session.

    问题描述 IDE:pycharm,环境中安装tensorflow-gpu 1.8.0 ,Cuda9 ,cudnn 7,等,运行代码 报错如下 tensorflow.python.framework.e ...

  3. 【转】报错:Program "sh" not found in PATH

    原文网址:http://www.cnblogs.com/SadNight/p/3406201.html (1) 报错:Program "sh" not found in PATH ...

  4. 在ios7真机上和iOS6模拟器上运行是好的,而在iOS6真机上运行却报错

    在ios7真机上和iOS6模拟器上运行是好的,而在iOS6真机上运行却报错 解决方法: 或是都设置为yes.. Build Active Architecture Only的意思是只生成适应的指令集

  5. 运行yum报错Error: Cannot retrieve metalink for reposit

    http://www.netpc.com.cn/593.html 运行yum报错Error: Cannot retrieve metalink for reposit 今天给Centos通过rpm - ...

  6. 转:运行yum报错Error: Cannot retrieve metalink for reposit

    http://www.netpc.com.cn/593.html 运行yum报错Error: Cannot retrieve metalink for repository: epel. Please ...

  7. 新建SpringBoot项目运行页面报错Whitelabel Error Page This application has no explicit mapping for /error, so yo

    新建SpringBoot项目运行页面报错Whitelabel Error Page This application has no explicit mapping for /error, so yo ...

  8. import tensorflow 报错: tf.estimator package not installed.

    import tensorflow 报错: tf.estimator package not installed. 解决方案1: 安装 pip install tensorflow-estimator ...

  9. 安装了nodejs后在命令行运行npm报错

    安装了nodejs后在命令行运行npm报错:Error: Cannot find module 'internal/util/types' 解决方法:删除目录“C:\Users\mengxiaobo\ ...

随机推荐

  1. sql查询学习和实践点滴积累

    https://blog.rjmetrics.com/2008/10/28/correlated-subqueries-in-mysql/ http://www.mysqltutorial.org/m ...

  2. CentOS随笔 - 6.CentOS7安装Git服务器

    前言 转帖请注明出处: http://www.cnblogs.com/Troy-Lv5/ 版本管理当然是选择git..反正我是被svn坑怕了... 这次安装的是git 2.18.0 点击下载 准备安装 ...

  3. codeforces 633E Startup Funding(浮点数处理)

    codeforces 633E Startup Funding 题意 枚举左端点,对于每个左端点求一个最大的右端点使得最大. 对于得到的这个数组,随机选择k个数,求最小值期望. 题解 对于每个左端点, ...

  4. IntelliJ IDEA常用设置(转)

    IntelliJ IDEA是一款非常优秀的JAVA编辑器,初学都可会对其中的一些做法感到很别扭,刚开始用的时候我也感到很不习惯,在参考了网上一些文章后在这里把我的一些经验写出来,希望初学者能快速适应它 ...

  5. 2、Python文件操作工具 xlrd 工具

    #打开excel文档workbook = xlrd.open_workbook('..\cye.xls',encoding_override='utf-8') #获取sheet页信息sheet = w ...

  6. JavaScript的事件对象_滚轮事件

    用户在使用键盘时会触发键盘事件.“DOM2 级事件”最初规定了键盘事件,结果又删除了相应的内容.最终还是使用最初的键盘事件,不过 IE9 已经率先支持“DOM3”级键盘事件. 一.键码 在发生 key ...

  7. cocos2d-x中关于打包成APK的问题

    转载自:http://blog.csdn.net/u013315178/article/details/51254630 之前在网上看了很多的帖子大多数用ide 来打包 太麻烦了 而且一般没有人现场指 ...

  8. 【PHP】mysql_insert_id() 函数

    mysql_insert_id() 函数返回上一步 INSERT 操作产生的 ID. 如果上一查询没有产生 AUTO_INCREMENT 的 ID,则 mysql_insert_id() 返回 0. ...

  9. 【JavaScript】富文本编辑器

    这是js写的富文本编辑器,还存在一些bug,但基本功能已经实现,通过这个练习,巩固了js富文本编辑方面的知识,里面包含颜色选择器.全屏.表情.上传图片等功能,每个功能实际对应的就是一个小插件啦 部分程 ...

  10. 2019.3.5 控制台输出log4j得有些报错信息

    报错内容如下 log4j:WARN No appenders could be found for logger (org.springframework.test.context.junit4.Sp ...