运行TensorFlow报错,“This program requires version 3.6.1 of the Protocol Buffer runtime library, but the installed version is 3.0.0.”
报错信息:
[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.”的更多相关文章
- DosBox 报错 this program requires dosxnt.exe to be in your path
也就是少了dosxnt.exe文件,能够上网搜索下载,把dosxnt 拷贝到你挂截文件夹下就能够执行 Dosxnt文件下载
- 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 ...
- 【转】报错:Program "sh" not found in PATH
原文网址:http://www.cnblogs.com/SadNight/p/3406201.html (1) 报错:Program "sh" not found in PATH ...
- 在ios7真机上和iOS6模拟器上运行是好的,而在iOS6真机上运行却报错
在ios7真机上和iOS6模拟器上运行是好的,而在iOS6真机上运行却报错 解决方法: 或是都设置为yes.. Build Active Architecture Only的意思是只生成适应的指令集
- 运行yum报错Error: Cannot retrieve metalink for reposit
http://www.netpc.com.cn/593.html 运行yum报错Error: Cannot retrieve metalink for reposit 今天给Centos通过rpm - ...
- 转:运行yum报错Error: Cannot retrieve metalink for reposit
http://www.netpc.com.cn/593.html 运行yum报错Error: Cannot retrieve metalink for repository: epel. Please ...
- 新建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 ...
- import tensorflow 报错: tf.estimator package not installed.
import tensorflow 报错: tf.estimator package not installed. 解决方案1: 安装 pip install tensorflow-estimator ...
- 安装了nodejs后在命令行运行npm报错
安装了nodejs后在命令行运行npm报错:Error: Cannot find module 'internal/util/types' 解决方法:删除目录“C:\Users\mengxiaobo\ ...
随机推荐
- Android数据统计
开发效率可以用这些方式提升: 1 . 构建公用工具类,方便大家使用 2 . 使用开源的一些包,例如ORM思想的数据库等 3 . 可以很快的找到问题.开发中,找bug的时间,往往是很多的.我用的方法有3 ...
- 古老的CSS同高列问题
今日在网页设计时,遇到了希望页面的几列同高需求的实现问题,搜罗了一下google,找到以下文章,感觉不错,翻译过来,同时作为学习加深印象. https://css-tricks.com/fluid-w ...
- Python学习---django多对多之Djanog默认表学习
案例一: from django.db import models class Book(models.Model): name = models.CharField(max_length=33) # ...
- + - ! function($) (), function 前面的符号意思
如果在function之前加上感叹号 (!) 会怎么样?比如下面的代码: !function(){alert('iifksp')}() // true 在控制台运行后得到的值时true, ...
- java冒泡排序-选择排序-插入排序-使用API中文文档直接调用函数
import java.util.Arrays; public class ArrayDemo2_3 { public static void main(String []args) { //---- ...
- Python运算符和数据类型
一.Python的逻辑运算符 1.数字运算符: 运算符 描述 例子 + 加 - 两个对象相加 a + b 输出结果 30 - 减 - 得到负数或是一个数减去另一个数 a - b 输出结果 -10 * ...
- 【bzoj2154】Crash的数字表格 莫比乌斯反演
题目描述 今天的数学课上,Crash小朋友学习了最小公倍数(Least Common Multiple).对于两个正整数a和b,LCM(a, b)表示能同时被a和b整除的最小正整数.例如,LCM(6, ...
- leetcode300. Longest Increasing Subsequence 最长递增子序列 、674. Longest Continuous Increasing Subsequence
Longest Increasing Subsequence 最长递增子序列 子序列不是数组中连续的数. dp表达的意思是以i结尾的最长子序列,而不是前i个数字的最长子序列. 初始化是dp所有的都为1 ...
- vector详讲(三)实例
移动语义: push语句有时候会通过移动语义来提高性能 #include <iostream> #include <vector> class Element { public ...
- jQuery .attr()和.removeAttr()方法操作元素属性示例
今天主要和大家一起分享一下如何使用jQuery的.attr()和.removeAttr()方法读取,添加,修改,删除元素的属性.大家在平时的Web页面制作中都有碰到如何动态的获取元素的属性和属性值,或 ...