无法从 jupyter 启动张量板

Posted

技术标签:

【中文标题】无法从 jupyter 启动张量板【英文标题】:Failing to launch tensorboard from jupyter 【发布时间】:2020-05-18 14:25:46 【问题描述】:

当我尝试从我的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

【问题讨论】:

【参考方案1】:

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

【讨论】:

我尝试安装protobuf version 3.8.0,但仍然遇到同样的问题。 ***.com/questions/62342221/… 你确定你已经正确地重新安装了protobuf吗?列出你的包,看看它是否写着protobuf 3.8.0 是的,protobuf 已正确安装:Name: protobuf. Version: 3.8.0. Summary: Protocol Buffers. Home-page: https://developers.google.com/protocol-buffers/. Author: None. Author-email: None. License: 3-Clause BSD License. Location: /usr/local/lib/python3.7/site-packages. Requires: six, setuptools. Required-by: tensorflow, tensorboard. tensorflow/tensorboard版本是2.0.0? 好的,如果可以,请尝试返回 2.0.0。这些是对我有用的版本。请注意,我在重新安装之前卸载了 ternsorflowprotobuf【参考方案2】:

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

【讨论】:

以上是关于无法从 jupyter 启动张量板的主要内容,如果未能解决你的问题,请参考以下文章

当我尝试在 VSCODE 上运行 jupyter notebook 时,未显示张量板输出

无法从 Anaconda Navigator (Windows) 启动 Jupyter Note

为啥jupyter notebook代码运行一直没有反应

为啥jupyter notebook代码运行一直没有反应?

运行jupyter notebook出现这种情况的原因如何解决

运行jupyter notebook出现这种情况的原因如何解决