环境:Mac os、Anaconda3
通过conda create -n tf36 python=3.6新建tensorflow的python环境,通过pip install tensorflow命令安装,启动tensorboard报错。
命令:tensorboard --logdir='path/to/log'
错误提示:ImportError: cannot import name 'ReparseException',表示从html5lib引入ReparseException错误。
解决方案:根据提示找到sanitizer.py文件,定位到报错内容:
| import html5lib from html5lib.constants import ( entities, ReparseException, namespaces, prefixes, tokenTypes, ) |
修改sanitizer.py文件内容,将ReparseException替换为_ReparseException:
重新运行命令:tensorboard --logdir='path/to/log'
在chrome中输入:http://localhost:6006/,出现以下内容,表示成功

在Macos环境下使用Anaconda3搭建tensorflow环境时,启动TensorBoard遇到ImportError错误,涉及html5lib库的问题。通过调整sanitizer.py文件中的ReparseException引用解决了此问题。
15万+

被折叠的 条评论
为什么被折叠?



