Error using tensorflow: needs protobuf 3.0.0 but finds 2.6.1 - pip3 shows 3.0.0b2 installed

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.

Answers


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.


Need Your Help

How to multiplex Vorbis and Theora streams using libogg

c video audio ogg-theora multiplexing

I am currently writing a simple Theora video encoder, which uses libogg, libvorbis and libtheora. Currently, I can submit frames to the Theora encoder, and PCM samples to the Vorbis encoder, pass the

different window.open opens the same page

c# javascript asp.net

I am using window.open to open 2 different pages in pop-up windows,but for some reason both the triggers opens the same page in the pop-up window,heres how I am trying to do this: