28

Running tensorboard --logdir log_dir I get an error:

Traceback (most recent call last):
  File "/home/user/.local/bin/tensorboard", line 11, in <module>
    sys.exit(run_main())
  File "/home/user/.local/lib/python3.6/site-packages/tensorboard/main.py", line 64, in run_main
    app.run(tensorboard.main, flags_parser=tensorboard.configure)
  File "/home/user/.local/lib/python3.6/site-packages/absl/app.py", line 300, in run
    _run_main(main, args)
  File "/home/user/.local/lib/python3.6/site-packages/absl/app.py", line 251, in _run_main
    sys.exit(main(argv))
  File "/home/user/.local/lib/python3.6/site-packages/tensorboard/program.py", line 228, in main
    server = self._make_server()
  File "/home/user/.local/lib/python3.6/site-packages/tensorboard/program.py", line 309, in _make_server
    self.assets_zip_provider)
  File "/home/user/.local/lib/python3.6/site-packages/tensorboard/backend/application.py", line 161, in standard_tensorboard_wsgi
    reload_task)
  File "/home/user/.local/lib/python3.6/site-packages/tensorboard/backend/application.py", line 194, in TensorBoardWSGIApp
    return TensorBoardWSGI(plugins, path_prefix)
  File "/home/user/.local/lib/python3.6/site-packages/tensorboard/backend/application.py", line 245, in __init__
    raise ValueError('Duplicate plugins for name %s' % plugin.plugin_name)
ValueError: Duplicate plugins for name projector

What can be a reason of this problem?

mrgloom
  • 20,061
  • 36
  • 171
  • 301
  • Did you have a look at this? Does it match your requirement? https://github.com/pytorch/pytorch/issues/22676 – LazyCoder Jul 27 '19 at 01:41
  • I get this using tensorflow 2.0.0.-tc0, no pytorch. Also there is no second tensorboard installation. – Oren Bochman Sep 10 '19 at 11:14
  • I'm having the same problem. I only have 1.14.0 installed, no pytorch. I did briefly install tensorflow 2.0.0-rc1 while debugging to see if that had the same problems (it all worked fine) but then removed it. Does pip3 uninstall 2.0.0-rc1 packages not remove all the configurations or something? ``` $ pip3 list | grep tensor tensorboard 1.14.0 tensorflow 1.14.0 tensorflow-estimator 1.14.0 ``` – fish Sep 22 '19 at 17:47
  • to me it's weird, I uninstalled the nightly as suggested. Then installed tensorflow and tensorboard (the latter with both pip and conda) but nothing worked. How did you install tensorflow and tensorboard? (btw I am using pytorch for tensorflow) – Charlie Parker Jul 22 '21 at 16:27

10 Answers10

45

If you have two versions of tensorboard installed in your system,you need to uninstall one of them.

I was stuck this for hours but I finally fixed it using:

Worked like a charm: https://github.com/pytorch/pytorch/issues/22676

pip uninstall tb-nightly tensorboardX tensorboard
pip install tensorboard
Charlie Parker
  • 5,884
  • 57
  • 198
  • 323
envi z
  • 677
  • 7
  • 13
  • to me it's weird, I uninstalled the nightly as suggested. Then installed tensorflow and tensorboard (the latter with both pip and conda) but nothing worked. How did you install tensorflow and tensorboard? (btw I am using pytorch for tensorflow) – Charlie Parker Jul 22 '21 at 16:27
  • For me it's `pip uninstall tb-nightly; pip install -U tensorboard --force` works. – leondgarse Apr 24 '22 at 01:43
17

I ran into the same issue after installing tensorflow==2.0.0-rc2. Uninstalling tensorboard did not help.

The culprit in my case was tb-nightly package:

#python3.7 -m pip list | grep tb
tb-nightly           1.15.0a20190806

After removing the package and reinstalling TensorFlow, tensorboard started to work properly.

ASLAN
  • 629
  • 1
  • 7
  • 20
user12144432
  • 187
  • 1
  • 2
  • how did you uninstall the nightly package? – Charlie Parker Jul 22 '21 at 16:20
  • to me it's weird, I uninstalled the nightly as suggested. Then installed tensorflow and tensorboard (the latter with both pip and conda) but nothing worked. How did you install tensorflow and tensorboard? (btw I am using pytorch for tensorflow) – Charlie Parker Jul 22 '21 at 16:27
14

I got same error, when I had two versions of tensorboard. In my Tensorflow 2.0 environmnet, except core Tensorflow lib, I could see other libs where installed from TF 1.14 version.

Do a pip list and see what versions of tensorflow libs are there. In my system I had

...
tensorboard                   1.14.0              
tensorflow-estimator          1.14.0              
tensorflow-gpu                2.0.0rc0            
tensorflow-serving-api        1.14.0              
termcolor                     1.1.0               
tf-estimator-nightly          1.14.0.dev2019080601
...

Here is what I did:

pip uninstall tensorboard
pip install --force-reinstall tf-nightly-2.0-preview
Mageswaran
  • 440
  • 3
  • 6
4

Run the following code if it shows two tensorboard installed on your system remove one.

import pkg_resources

for entry_point in pkg_resources.iter_entry_points('tensorboard_plugins'):
    print(entry_point.dist)
Unnikrishnan
  • 2,683
  • 5
  • 22
  • 39
3

For Ubuntu users, go to: /home/$USERNAME/.local/lib/python3.8/site-packages/ or whatever path is displayed in the error. There you will see 2 folders with names something like this tensorboard and tensorboad-2.5.0.dist-info. Remove the second one.

shaswat.dharaiya
  • 381
  • 4
  • 13
1

One easy workaround for these sorts of issues is to call tensorboard via python -m tensorboard.main. For example, replace tensorboard --logdir ./model --port 6006 with python -m tensorboard.main --logdir ./model --port 6006. Much easier!

jxmorris12
  • 1,262
  • 4
  • 15
  • 27
1

It took me a day to figure it out finally. In my case there were two folders for tensorboard at

** C:\ProgramData\Anaconda3\Lib\site-packages\ **

Keep the tensorboard folder for your preferred version and delete the other.

0

For me what worked was to uninstall the nightly build which is usually installed with pip since tf is usually installed with pip:

pip uninstall tb-nightly

then I installed tensorboard with conda

conda install -y -c conda-forge tensorboard

note I am using pytorch with tensorboard: https://pytorch.org/tutorials/recipes/recipes/tensorboard_with_pytorch.html

I did not need to install tensorflow but I did it in a second test since it was complaining about not having full features:

pip install tensorflow

since for some reason conda doesn't instlal tensorflow well (I tried it with conda-forge -c channel and it took to long to do anything).


Note you might need to uninstall more stuff as the answer https://stackoverflow.com/a/59408145/1601580:

pip uninstall tb-nightly tensorboardX tensorboard

suggested

Charlie Parker
  • 5,884
  • 57
  • 198
  • 323
0

I have faced the same problem. I found the problem creator was tb-nightly. I had installed it to resolve "Cannot start tensorboard in Jupyter Notebook" problem but after one day it arises "duplicate plugins for name projector" error.

I have tried pip uninstall tb-nightly but unfortunately it didn't work for me. The jupyter notebook was stacked in running.

Finally,I went to my site-packages folderC:\Users\User\anaconda3\Lib\site-packages and delete the tb-nightly folder,as well as from RecycleBin and it worked.enter image description here

Md.Rakibuz Sultan
  • 759
  • 1
  • 8
  • 13
0

In short: You are very likely to have both tb-nightly and tensorboard installed. Nightly dependencies can easily mess thing sup.

Uninstall BOTH:

pip uninstall tb-nightly tensorboard

And install one that is compatible with your TF version (either tensorboard or tb-nightly):

pip install tensorboard          # or tb-nightly
Jongwook Choi
  • 8,171
  • 3
  • 25
  • 22