报错信息:

[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. Android沉浸式状态栏

    private void initWindows() { Window window = getWindow(); int color = getResources().getColor(androi ...

  2. Xshell启动时显示丢失MSVCP110.dll

    重装系统,装完Xshell5启动时,出现丢失MSVCP110.dll文件 这种情况不要相信网上所说的什么下载“MSVCP110.dll”文件或者下载微软的vcredist 2012 这样没用 正确的姿 ...

  3. Linux常用命令(三)————创建+删除+设置权限

    1. mkdir mkdir [选项] DirName 命令中的[选项]: -m    用于对新建目录设置存取权限,也可以用 chmod 命令进行设置. -p     需要时创建上层文件夹(或目录), ...

  4. Jquery使两个Div的滚动条同步滚动

    $("#div").scroll(function(){ $("#div1").scrollTop($(this).scrollTop()); // 纵向滚动条 ...

  5. mysql那些招

    show table status mysql官方文档在 http://dev.mysql.com/doc/refman/5.1/en/show-table-status.html 这里的rows行是 ...

  6. 纯绿色集成环境,可切换180个Mysql、700个PHP版本

    测试神器又出新版!功能更强大(目测linux版本也快要出了,拭目以待吧) PHPWAMP8.8.8.8集成环境,目测大概更新如下内容(我也就是大略看了下更新内容) 1.支持自定义设置任意Mysql版本 ...

  7. SQL常用

    --1.创建schema create schema exp   --2.把dbo下面的对象e_A,移到exp下面 alter schema exp transfer dbo.e_A   --3分组字 ...

  8. ecshop hash登录 + wordpress mysql盲注字段

    delete_cart_goods.php  post  id=a * sq_xfkjbd 暴库and(select 1 from(select count(*),concat((select (se ...

  9. tcp通讯中socket套接字accept和listen的关系

    今天看到一个文章,客户端的connect在服务端调用accept之前,突然想到这可以建立正常的连接么?以前从没细细的思考过listen accept connect之前的关系,带着疑问学习了一下,记录 ...

  10. Web App, Native APP,Hybird App 介绍

    一.Web App 这个主要是采用统一的标准的 HTML,JavaScript.CSS 等 web 技术开发. 用户无需下载,通过不同平台 的浏览器访问来实现跨平台, 同时可以通过浏览器支持充分使用 ...