title: TensorFlow protobuf version mismatch
body: <p>I've install TensorFlow via <code>virtualenv</code>. And it works well.</p>
  
  <p>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:</p>
  
  <pre><code>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.
  </code></pre>
  
  <p>In virtualenv:</p>
  
  <pre><code>$ pip show protobuf
  Name: protobuf
  Version: 3.4.0
  Summary: Protocol Buffers
  </code></pre>
  
  <p>And in shell:</p>
  
  <pre><code>$ protoc --version
  libprotoc 3.4.0
  </code></pre>
  
  <p>I used to have <code>protobuf-2.6.1</code> in my environment but now upgrade to <code>3.4.0</code>. </p>
  
  <p>ubuntu 16.04</p>