Search code examples
pythontensorflowjupyter-notebooktensorboard

Failing to launch tensorboard from jupyter


I get the error below when I try launching tensorboard from my jupyter notebook. I am using a conda environment and using the env-specific kernel since tensorflow is only installed in my environment. What am I doing wrong?

The error:

%tensorboard --logdir logs

ERROR: Failed to launch TensorBoard (exited with -6).
Contents of stderr:
[libprotobuf ERROR external/com_google_protobuf/src/google/protobuf/descriptor_database.cc:393] Invalid file descriptor data passed to EncodedDescriptorDatabase::Add().
[libprotobuf FATAL external/com_google_protobuf/src/google/protobuf/descriptor.cc:1367] 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):

EDIT

I have the problem even when I try launching from the terminal (inside my conda env):

tensorboard --logdir = 'logs/'

[libprotobuf ERROR external/com_google_protobuf/src/google/protobuf/descriptor_database.cc:393] Invalid file descriptor data passed to EncodedDescriptorDatabase::Add().
[libprotobuf FATAL external/com_google_protobuf/src/google/protobuf/descriptor.cc:1367] 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

Solution

  • I found the following solution. Apparently this is a specific issue that occurs when running macOS Catalina, and can be solved by switching to protobuf version 3.8.0. So basically uninstalling tensorflow and protobuf and re-installing with protobuf = 3.8.0. I found this answer here, check it out for further info.