Reputation: 61
running my newest python code (which uses keras/tensorflow), I get this error:
[libprotobuf FATAL google/protobuf/stubs/common.cc:61] This program requires version 3.0.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/src/google/protobuf/any.pb.cc".) terminate called after throwing an instance of 'google::protobuf::FatalException' what(): This program requires version 3.0.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/src/google/protobuf/any.pb.cc".)
However, when doing pip3 list I get:
protobuf (3.0.0b2)
tensorflow (0.9.0)
(among others)
I'm using Ubuntu 16.04, running CUDA 7.5 on a Nvidia 1070 GTX. I have updated to the latest versions of all relevant packages for my code and I have uninstalled and reinstalled protobuf and tensorflow.
This error only occurs only with code I wrote today, not with any other code that I ran on this machine before. So there is probably something wrong with my code, but the error message is not really pointing me there.
Can anybody help? Thanks.
Upvotes: 0
Views: 2661
Reputation: 166
I'm using Ubuntu 16.04, with tensorflow 0.90 installed from source, with cuda 8.0RC & cudann5. I had this exact same error with some keras code which utilised the tensorflow backend.
It's not 100% clear where the problem lies, but it doesn't appear when running any tensorflow code directly, nor with skflow. So far I have only encountered the problem while using keras, but after exploring the keras backend code, I cannot see anything that looks suspicious.
However, I do have a solution which works for me. As Chris suggested, if I ensure that the very first import that occurs is import tensorflow as tf
, it loads as expected and everything works. My guess is that there is some module conflict where some other packages are loading in a different version of protobuf before tensorflow can, perhaps.
Upvotes: 1