I've install TensorFlow via virtualenv. And it works well.
Now I want to load model using C++ and do prediction. But I fail to compile my program because of protobuf version mismatch. Error like:
tensorflow/core/framework/device_attributes.pb.h:17:2: error: #error This file was generated by an older version of protoc which is
#error This file was generated by an older version of protoc which is
^
tensorflow/core/framework/device_attributes.pb.h:18:2: error: #error incompatible with your Protocol Buffer headers. Please
#error incompatible with your Protocol Buffer headers. Please
^
tensorflow/core/framework/device_attributes.pb.h:19:2: error: #error regenerate this file with a newer version of protoc.
#error regenerate this file with a newer version of protoc.
In virtualenv:
$ pip show protobuf
Name: protobuf
Version: 3.4.0
Summary: Protocol Buffers
And in shell:
$ protoc --version
libprotoc 3.4.0
I used to have protobuf-2.6.1 in my environment but now upgrade to 3.4.0.
ubuntu 16.04