报错信息:

[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. Windows系统环境下安装dlib

    Windows系统环境下安装dlib 因为今天需要在windows环境下做一些图片处理,所以需要在pycharm中配置环境,而其中需要的主要是dlib的安装: 下面说一下关于dlib的配置安装: —- ...

  2. 【Oracle】等待事件详细内容

    一.等待事件的相关知识 1.1 等待事件主要可以分为两类,即空闲(IDLE)等待事件和非空闲(NON-IDLE)等待事件.1). 空闲等待事件指ORACLE正等待某种工作,在诊断和优化数据库的时候,不 ...

  3. Angular5中提取公共组件之checkbox list

    因为工作原因,需要使用到checkbox list多选项功能. 一直在尝试在checkbox组件中添加NgModel的属性,但是只能在单个checkbox复选框上使用,checkbox list就没办 ...

  4. Nginx配置文件nginx.conf详细说明文档

    在此记录下Nginx服务器nginx.conf的配置文件说明, 部分注释收集于网络. user    www-data;                        #运行用户 worker_pro ...

  5. 深入浅出SharePoint2010——请假系统无代码篇之权限设计

    首选我们需要区分3个跟权限相关的概念. 权限项目(Permission):最小的权限粒度.比如创建列表项.审批等. 权限级别(Permission Level):权限项目不能直接赋予用户或者用户组,只 ...

  6. pip 使用国内镜像源加速

    现在做开发可是真的不容易,好像不论哪一个语言当你使用到包管理工具的时候都要进行一些网络的配置,否则速度慢如龟,无论是 maven 还是 npm 又或者是我们要说的 pip. 更换国内的源好像已经是必备 ...

  7. 在ubuntu上使用QQ的经历

    pidgin-lwqq: 项目首页:https://github.com/xiehuc/pidgin-lwqq sudo add-apt-repository ppa:lainme/pidgin-lw ...

  8. 2018-2019-2 网络对抗技术 20165322 Exp2 后门原理与实践

    2018-2019-2 网络对抗技术 20165322 Exp2 后门原理与实践 目录 实验准备 后门概念 常用后门工具 实验内容与步骤 使用netcat获取主机操作Shell,cron启动 使用so ...

  9. 【[HNOI2008]GT考试】

    我又来复习\(kmp\)了 其实这道题主要是一个矩阵乘法,但是\(kmp\)在其中也有着非常重要的作用 我们可以这样定义状态\(dp[i][j]\)表示文本串进行到了\(i\)位置,同时文本串在最后和 ...

  10. sudo 启动tomcat报错没有java环境

    报错: Cannot find ./catalina.shThe file is absent or does not have execute permissionThis file is need ...