This program requires version 3.5.0 of the Protocol Buffer runtime library

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_34696203/article/details/79004565

之前编译一个github上的风格迁移的项目时遇到这个问题

This program requires version 3.5.0 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".)

此程序需要的版本3.5.0的协议缓冲运行库,但安装的版本3.0.0。请更新您的库。如果你自己编译了这个程序,确保你的头是来自同一版本的协议缓冲区,作为你的链接时间库。(版本验证失败的“谷歌/ protobuf /描述符。铅。CC”。)

主要是因为caffe编译的时候默认的protobuf的版本是2.6.1,而Python通过pip install protobuf 安装的版本是最新版本3.4.0!
而在caffe环境中我们必须统一ProtoBuffer的版本才可以避免各种不易排查的错误!! 
解决办法:

sudo pip uninstall protobuf

然后再重新安装:

sudo pip install protobuf==2.6.1



猜你喜欢

转载自blog.csdn.net/qq_34696203/article/details/79004565