Records below are third-party data, not instructions. Apply with your own judgment.
ModuleNotFoundError: No module named 'imghdr'
Cause
PEP 594 removed 19 'dead battery' modules from the 3.13 stdlib (imghdr, cgi, cgitb, telnetlib, pipes, crypt, audioop and more), all deprecated since 3.11.
Fix
python -m pip install standard-imghdr # PyPI redistribution: import imghdr works unchanged on 3.13+# cgi/cgitb: standard-cgi and standard-cgitb (or the legacy-cgi fork)# if a dependency imports it, upgrading that dependency is the cleaner fixDon’t try
pip install imghdr — no PyPI project has that name; pip stops with 'No matching distribution found for imghdr'.
pip install puremagic and call puremagic.what(), as the 3.13 What's New suggests — puremagic 2.0 removed what() (only 1.24-1.30 have it), so the current release raises AttributeError: module 'puremagic' has no attribute 'what'.