TX2 Protobuf上的tensorflow

时间:2019-02-04 14:19:54

标签: tensorflow protocol-buffers nvidia

嗨,我已经使用
安装了tensorflow https://devtalk.nvidia.com/default/topic/1038957/jetson-tx2/tensorflow-for-jetson-tx2-/post/5278617/#5278617

当我运行python脚本时,出现以下错误:

libprotobuf FATAL google/protobuf/stubs/common.cc:61] This program requires version 3.5.0 of the Protocol Buffer runtime library, but the installed version is 2.6.1.  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 "external/protobuf_archive/src/google/protobuf/any.pb.cc".)
抛出'google :: protobuf :: FatalException'实例后调用

terminate   what():此程序需要协议缓冲区运行时库的3.5.0版,但已安装的版本为2.6.1。请更新您的图书馆。如果您自己编译程序,请确保标头与链接时库来自相同版本的协议缓冲区。 (版本验证在“ external / protobuf_archive / src / google / protobuf / any.pb.cc”中失败。) 中止(核心已弃用)

pip show protobuf i get Version: 3.6.1
Summary: Protocol Buffers
Home-page: https://developers.google.com/protocol-buffers/
Author: protobuf@googlegroups.com
Author-email: protobuf@googlegroups.com
License: 3-Clause BSD License
Location: /home/nvidia/vitualenv/lib/python2.7/site-packages
Requires: setuptools, six
Required-by: tensorflow-gpu, tensorboard

有人对如何解决这个问题有想法吗?

谢谢

1 个答案:

答案 0 :(得分:0)

最后我明白了。最后,我必须在python文件的开头import tensorflow。除了这一解决方案,没有其他解决方案对我有用。

我不明白为什么。 如果有人知道答案,您能解释一下为什么吗?

谢谢