Python 3.12 以降では distutils が含まれなくなったため、import japanize_matplotlib を実行すると、ModuleNotFoundError: No module named 'distutils' というエラーが発生します。 この問題の対処法としては、以下の方法があります: ...
If you want to display Japanese fonts in matplotlib on Python 3.12 or later, importing japanize-matlibplot-modern is easy ...