tensorboard: ImportError: cannot import name 'run_main' - Unable to launch tensorboard

(DL) ♦ ~ / ➞  tensorboard
/Users/carbon/Dev/anaconda/envs/DL/lib/python3.6/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
  from ._conv import register_converters as _register_converters
Traceback (most recent call last):
  File "/Users/carbon/Dev/anaconda/envs/DL/bin/tensorboard", line 7, in <module>
    from tensorboard.main import run_main
ImportError: cannot import name 'run_main'

I built Tensorflow from the latest 1.5.0rc0 release.

tensorflow (1.5.0rc0)
tensorflow-tensorboard (0.1.8)

Referencing: https://github.com/tensorflow/tensorflow/issues/16011

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 21 (11 by maintainers)

Commits related to this issue

Most upvoted comments

This is due to a mismatch in the version of tensorboard installed versus the version of tensorflow; run_main is not present until tensorflow-tensorboard >= 0.4.0rc1. The actual 1.5.0 tensorflow release should have a corrected version specifier that updates tensorboard appropriately on install.

For now, doing a manual pip install -U tensorflow-tensorboard==0.4.0rc3 should resolve this problem. You can also do pip install tb-nightly as recommended above.

A workaround that worked for me - running tensorboard directly, i.e

python3 /usr/local/lib/python3.5/dist-packages/tensorboard/main.py --logdir=/tmp/

Maybe helpful for someone else.

I’ve tried all the methods above but it still doesn’t work until I removed this directory: ~/.local/lib/python3.5/site-packages/tensorboard

Wish this could help.

For versions prior to 1.6.0 we used the tensorflow-tensorboard package name. Since pip doesn’t have a notion of package renames, it’s not aware that tensorboard 1.6.0 should replace tensorflow-tensorboard 1.5.0. See here under “Known issues” for details: https://github.com/tensorflow/tensorboard/releases/tag/1.6.0

Once TF 1.6 is out, installing it should only install tensorboard and not tensorflow-tensorboard. In the mean time, as long as it’s working, it’s harmless to leave tensorflow-tensorboard installed.

I like that project. I think it demonstrates an important niche we’re hoping TensorBoard can serve in the upcoming future. Especially considering the state of the TF Docker setup. I’ll definitely be taking a closer look at that codebase soon, since I’m always interested in learning about the heroics people manage to achieve with customized TensorBoard repos.