Tensorboad运行BUG——‘EntryPoints‘ object has no attribute ‘get‘

Tensorboad运行BUG——‘EntryPoints‘ object has no attribute ‘get‘TensorBoard 运行 BUG 排除 entrypoints objecthasnoa get

大家好,欢迎来到IT知识分享网。

0 问题描述

Tensorboard很早就集成在Pytorch环境中,使用的编译器VsCode也集成了Tensorboard。最近上手使用,发现无论是运行代码还是配置相比于好几年前Tensorflow时期简便了许多,但是在运行的时候发现了BUG,如下:‘EntryPoints’ object has no attribute ‘get’.

C:\Users\user\Documents\Python\yolov7>tensorboard --logdir=runs/train Traceback (most recent call last): File "C:\Users\user\anaconda3\envs\yolov7\lib\runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "C:\Users\user\anaconda3\envs\yolov7\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\user\anaconda3\envs\yolov7\Scripts\tensorboard.exe\__main__.py", line 4, in <module> File "C:\Users\user\anaconda3\envs\yolov7\lib\site-packages\tensorboard\main.py", line 27, in <module> from tensorboard import default File "C:\Users\user\anaconda3\envs\yolov7\lib\site-packages\tensorboard\default.py", line 33, in <module> from tensorboard.plugins.audio import audio_plugin File "C:\Users\user\anaconda3\envs\yolov7\lib\site-packages\tensorboard\plugins\audio\audio_plugin.py", line 23, in <module> from tensorboard import plugin_util File "C:\Users\user\anaconda3\envs\yolov7\lib\site-packages\tensorboard\plugin_util.py", line 24, in <module> import markdown File "C:\Users\user\AppData\Roaming\Python\Python37\site-packages\markdown\__init__.py", line 29, in <module> from .core import Markdown, markdown, markdownFromFile # noqa: E402 File "C:\Users\user\AppData\Roaming\Python\Python37\site-packages\markdown\core.py", line 26, in <module> from . import util File "C:\Users\user\AppData\Roaming\Python\Python37\site-packages\markdown\util.py", line 87, in <module> INSTALLED_EXTENSIONS = metadata.entry_points().get('markdown.extensions', ()) AttributeError: 'EntryPoints' object has no attribute 'get' 

1 解决

尝试过许多网上建议的方法,包括Tensorboard运行命令行格式(logdir加不加引号等),Tensorboard安装版本(配置低版本),但都没用,还是同样报错信息。

最后终于找到了一条解决方案。检查运行python环境中importlib-metadata库的版本,出现上述BUG可能是 importlib-metadata=5.0。重新安装低版本importlib-metadata即可,例如importlib-metadata=4.13.0。

pip install importlib-metadata==4.13.0 

最后在本地端/VsCode成功运行(集成在vs中还蛮好用的),完结撒花~
Tensorboad运行BUG——‘EntryPoints‘ object has no attribute ‘get‘
感谢Smellly。

免责声明:本站所有文章内容,图片,视频等均是来源于用户投稿和互联网及文摘转载整编而成,不代表本站观点,不承担相关法律责任。其著作权各归其原作者或其出版社所有。如发现本站有涉嫌抄袭侵权/违法违规的内容,侵犯到您的权益,请在线联系站长,一经查实,本站将立刻删除。 本文来自网络,若有侵权,请联系删除,如若转载,请注明出处:https://haidsoft.com/156544.html

(0)
上一篇 2025-02-11 18:20
下一篇 2025-02-11 18:25

相关推荐

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注微信