0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

[Python / tensorboard] Python 3.13 と numpy>=2.0で tensorborad を使用するときのエラー対策

Posted at

概要

pip install には成功するのだけど、 tensorboard の起動時にエラーが発生するときの対策を記載しています。

対象エラー

この記事では、以下の二つのエラーを対象としています。

  • AttributeError: np.string_ was removed in the NumPy 2.0 release. Use np.bytes_ instead.
  • ModuleNotFoundError: No module named 'imghdr'

解消法

1. AttributeError: np.string_ was removed in the NumPy 2.0 release. Use np.bytes_ instead.

numpy のバージョンが 2.0 以上の時に、 tensorboard のバージョンが古いと発生するようです。

対処法は、以下の記事に掲載されていました。

具体的には、以下のように tensorboard のバージョンを 2.18.0 にあげることで解消できました。

requirements.txt
tensorboard==2.18.0

2. ModuleNotFoundError: No module named 'imghdr'

こちらは、 Python 3.13 の時に発生するエラーのようでした。

対処法は、以下の記事に掲載されていました。

standard-imghdr==3.13.0 という pip モジュールを追加することで解消できました。

requirements.txt
standard-imghdr==3.13.0
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?