无法从 jupyter 启动 tensorboard

Failing to launch tensorboard from jupyter

当我尝试从 jupyter notebook 启动 tensorboard 时出现以下错误。我正在使用 conda environment 并使用特定于环境的内核,因为 tensorflow 仅安装在我的环境中。我做错了什么?

错误:

%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):

编辑

即使我尝试从终端(在我的 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

我找到了以下解决方案。显然这是 运行 macOS Catalina 时发生的特定问题,可以通过切换到 protobuf version 3.8.0 来解决。所以基本上卸载 tensorflowprotobuf 并使用 protobuf = 3.8.0 重新安装。我找到了这个答案 here,查看它以获取更多信息。

conda update protobuf 帮我解决了。我假设你也可以使用 pip 升级,但我没有尝试