1, when use tensorflow r0.12, come accross the problem:
serialized_pb=_b(‘\n/tensorflow/core/framework/resource handle.proto\x12\tensorflow\”m\n\x0eResourceHandle\x12\x0e\n\x06\x64\x65vice\x18\x01 \x01(\t\x12\x11\n\tcontainer\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x11\n\thash_code\x18\x04 \x01(\x04\x12\x17\n\x0fmaybe_type_name\x18\x05 \x01(\tB4\n\x18org.tensorflow.frameworkB\x13ResourceHandleProtoP\x01\xf8\x01\x01\x62\x06proto3’) TypeError: init() got an unexpected keyword argument ‘syntax’
solution:
locate protobuf
import google.protobuf
print google.protobuf.__file__
print google.protobuf.__version__
3.2.0protoc –version
2.6.1
decide to compile protobuf from source code
git clone https://github.com/google/protobuf.git
### readme is very important
sudo apt-get install autoconf automake libtool curl make g++ unzip
./autogen.sh
./configure
make
cd python/
sudo python setup.py install
then tensorflow works normally