Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tensorboard fails in python 3.13 because imghdr module is absent #6964

Open
Bichidian opened this issue Dec 18, 2024 · 2 comments
Open

Tensorboard fails in python 3.13 because imghdr module is absent #6964

Bichidian opened this issue Dec 18, 2024 · 2 comments

Comments

@Bichidian
Copy link

Running tensorboard --logdir . under python 3.13 leads to the following error:

Traceback (most recent call last):
  File ".venv/bin/tensorboard", line 5, in <module>
    from tensorboard.main import run_main
  File ".venv/lib64/python3.13/site-packages/tensorboard/main.py", line 27, in <module>
    from tensorboard import default
  File ".venv/lib64/python3.13/site-packages/tensorboard/default.py", line 40, in <module>
    from tensorboard.plugins.image import images_plugin
  File ".venv/lib64/python3.13/site-packages/tensorboard/plugins/image/images_plugin.py", line 18, in <module>
    import imghdr
ModuleNotFoundError: No module named 'imghdr'

It seems that imghdr is no longer part of the Python standard library in 3.13.

@arcra
Copy link
Member

arcra commented Dec 20, 2024

Thanks for reporting. We'll look for a replacement for this library.

AFAICT, we only use it to get MIME types, which I expect should be somewhat easily replaceable, but we can't guarantee when we'll address this. In the meantime, Python < 3.13 would be required.

@hzhangxyz
Copy link

You can install standard-imghdr for temporary fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants