tensorflow: tensorflow 2.0.0 crashes with protobuf 3.10.1 on macOS
Using MacPorts with the latest up-to-date versions (tensorflow 2.0.0, protobuf 3.10.1),
python3 -c 'import tensorflow'
[libprotobuf ERROR google/protobuf/descriptor_database.cc:394] Invalid file descriptor data passed to EncodedDescriptorDatabase::Add().
[libprotobuf FATAL google/protobuf/descriptor.cc:1359] CHECK failed: GeneratedDatabase()->Add(encoded_file_descriptor, size):
libc++abi.dylib: terminating with uncaught exception of type google::protobuf::FatalException: CHECK failed: GeneratedDatabase()->Add(encoded_file_descriptor, size):
Abort trap: 6
This is reported and closed in https://github.com/tensorflow/tensorboard/issues/2985, but the issue persists.
A workaround is pip-3.7 install protobuf==3.8, but this doesn’t work with system-level, up-to-date library installs like with MacPorts. Also see: https://trac.macports.org/ticket/59826
Is this an issue with TF, or with protobuf?
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 3
- Comments: 21 (5 by maintainers)
Commits related to this issue
- Make libprotobuf symbols local on OSX @gnossen gave a great overview in https://github.com/grpc/grpc/pull/24992 of the overall problem. If a python process using both protobuf _and_ another native l... — committed to rowillia/protobuf by deleted user 3 years ago
- Make libprotobuf symbols local on OSX (#8346) @gnossen gave a great overview in https://github.com/grpc/grpc/pull/24992 of the overall problem. If a python process using both protobuf _and_ anothe... — committed to protocolbuffers/protobuf by rowillia 3 years ago
- Make libprotobuf symbols local on OSX (#8346) @gnossen gave a great overview in https://github.com/grpc/grpc/pull/24992 of the overall problem. If a python process using both protobuf _and_ anothe... — committed to acozzette/protobuf by rowillia 3 years ago
- Make libprotobuf symbols local on OSX (#8346) (#9435) @gnossen gave a great overview in https://github.com/grpc/grpc/pull/24992 of the overall problem. If a python process using both protobuf _and... — committed to protocolbuffers/protobuf by acozzette 2 years ago
I got the same error after
pip3 install tensorflow, but solved simply through:The latest protobuf 3.11.3 works fine.
I experience the same issue if I install tensorflow from conda, which gets libprotobuf 3.11.1 Workaround of
protobuf==3.8suggested here worked for me on conda as well.Another thing you can try is to install an older version of libprotobuf and *protobuf. I had the same issue but I was using anaconda. I went from version 3.10.1 to version 3.8.0. After doing this it started working. Not sure if this is because I unistalled and reinstalled thoughs pakcages or if it was a version issue.
python 3.6, Tf 2.2.0, protobuf 3.12.1. Stil doesnt work, tried many other other of both tf and protobuf but no success. Using Pycharm and working in venv
had a similar issue when loading Tensorboard in a jupyter notebook. uninstalling protobuf 3.11.2 and installing protobuf==3.8 worked. protobuff==3.11.3 did NOT work.