简体   繁体   English

TX2 Protobuf上的tensorflow

[英]tensorflow on tx2 protobuf

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

when i run the python script i get the following error: 当我运行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".)

terminate called after throwing an instance of 'google::protobuf::FatalException' what(): This program requires version 3.5.0 of the Protocol Buffer runtime library, but the installed version is 2.6.1. 抛出“ google :: protobuf :: FatalException” what()实例后调用终止方法:该程序需要协议缓冲区运行时库的3.5.0版,但已安装的版本为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".) Aborted (core dumped) (版本验证在“ 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

someone have some ideas how to solve this? 有人有一些想法如何解决这个问题?

Thanks 谢谢

Finally i got it worked. 终于我明白了。 In the end i have to import tensorflow at the beginning of the python file. 最后,我必须在python文件的开头import tensorflow No other solution worked for me except this one. 除了这一解决方案,没有其他解决方案对我有用。

I do not understand why. 我不理解为什么。 If someone know the answer can you please explain me why? 如果有人知道答案,您能解释一下为什么吗?

Thanks 谢谢

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM