Pytorch: Tensorboard: ValueError: Duplicate plugins for name projector

Created on 10 Jul 2019  ·  36Comments  ·  Source: pytorch/pytorch

I follow the introduction and happened to this error.
cuda10, cudnn7, install pytorch by pip.

however, when I check by

> torch.utils.tensorboard import SummaryWriter

, it is all right.

Python 3.7.3 | packaged by conda-forge | (default, Jul  1 2019, 21:52:21) 
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from torch.utils.tensorboard import SummaryWriter
>>> 

but when I use

> tensorboard --logdir=runs, it happens to this error:

`Traceback (most recent call last):
  File "/home/kingsoft/anaconda3/envs/liubiao2/bin/tensorboard", line 10, in <module>
    sys.exit(run_main())
  File "/home/kingsoft/anaconda3/envs/liubiao2/lib/python3.7/site-packages/tensorboard/main.py", line 64, in run_main
    app.run(tensorboard.main, flags_parser=tensorboard.configure)
  File "/home/kingsoft/anaconda3/envs/liubiao2/lib/python3.7/site-packages/absl/app.py", line 300, in run
    _run_main(main, args)
  File "/home/kingsoft/anaconda3/envs/liubiao2/lib/python3.7/site-packages/absl/app.py", line 251, in _run_main
    sys.exit(main(argv))
  File "/home/kingsoft/anaconda3/envs/liubiao2/lib/python3.7/site-packages/tensorboard/program.py", line 228, in main
    server = self._make_server()
  File "/home/kingsoft/anaconda3/envs/liubiao2/lib/python3.7/site-packages/tensorboard/program.py", line 309, in _make_server
    self.assets_zip_provider)
  File "/home/kingsoft/anaconda3/envs/liubiao2/lib/python3.7/site-packages/tensorboard/backend/application.py", line 161, in standard_tensorboard_wsgi
    reload_task)
  File "/home/kingsoft/anaconda3/envs/liubiao2/lib/python3.7/site-packages/tensorboard/backend/application.py", line 194, in TensorBoardWSGIApp
    return TensorBoardWSGI(plugins, path_prefix)
  File "/home/kingsoft/anaconda3/envs/liubiao2/lib/python3.7/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`
high priority dependency bug tensorboard triage review triaged

Most helpful comment

@Biaocsu, I also met the problem but I fixed it. My method is:

  1. I downloaded a test script from https://raw.githubusercontent.com/tensorflow/tensorboard/master/tensorboard/tools/diagnose_tensorboard.py
  2. I run it and it told me that I have two tensorboards with a different version. Also, it told me how to fix it.
  3. I followed its instructions and I can make my tensorboard work.

I think this error means that you have two tensorboards installed so the plugin will be duplicated. Another method would be helpful that is to reinstall the python environment using conda.

Hope to help you.

All 36 comments

This sounds like a misconfiguration issue with tensorboard. @lanpa do you know if this is a PyTorch bug or not?

I have the same issue: being able to import from the latest version of pytorch and tensorboardX but both give the same error above

This issue is caused by tb-nightly, and tb-nightly is difficult to uninstall.
I rebuilt the environment and use the tensorflow, tensorboard, tensorboardx without the tb-nightly this time, and the issue is gone.

@LU4E what do you mean , uninstall tb-nightly and install tensorflow、tensorbard、tensorboardx ? then the issue will gone ?

@Biaocsu Yes. I first try uninstall the tb-nightly many times but it still there. I don't know why.
You can build a new environment, install tensorflow, tensorboard, tensorboardx, espically, don't install tb-nightly.

@LU4E it does not suitable for me, I can successfully uninstall tb-nightly. and yes I am really using another environment to use tensorboard

@Biaocsu I have encountered the same issue but solved by uninstalling tensorboard. Maybe remaining tensorboard is bad.

@YosukeSugiura thanks for your advice, but I tried and it does no effect

@Biaocsu, I also met the problem but I fixed it. My method is:

  1. I downloaded a test script from https://raw.githubusercontent.com/tensorflow/tensorboard/master/tensorboard/tools/diagnose_tensorboard.py
  2. I run it and it told me that I have two tensorboards with a different version. Also, it told me how to fix it.
  3. I followed its instructions and I can make my tensorboard work.

I think this error means that you have two tensorboards installed so the plugin will be duplicated. Another method would be helpful that is to reinstall the python environment using conda.

Hope to help you.

@ElegantLin thanks

Same issue, and thanks for @elad663 's solution.
But the solution given by the script is to uninstall tensorboardX and tb-nightly, and install tensorflow.
Is there other solution with pure pytorch environment?

Upgrading priority as this issue seems to be affecting many people

@ezyang I think @ElegantLin has provided the solution. The root cause is tensorboard version conflict.
@TomorrowIsAnOtherDay You can open a new conda environment and pip install torch, tensorboard for a pure pytorch setting.

OK, in that case we can close this issue.

### Suggestion: Fix conflicting installations

Conflicting package installations found. Depending on the order of
installations and uninstallations, behavior may be undefined. Please
uninstall ALL versions of TensorFlow and TensorBoard, then reinstall
ONLY the desired version of TensorFlow, which will transitively pull
in the proper version of TensorBoard. (If you use TensorBoard without
TensorFlow, just reinstall the appropriate version of TensorBoard
directly.)

Namely:

    pip uninstall tb-nightly tensorboard tensorflow-estimator tensorflow-gpu tf-estimator-nightly
    pip install tensorflow  # or `tensorflow-gpu`, or `tf-nightly`, ...

This suggestion generated by @ElegantLin 's script fixed my problem. Thanks~

I experienced the same issue, and uninstalling and reinstalling tensorboard and tensorflow didn't help. In my case, I had a ghost copy of tensorboard 2.0.0 that had apparently not been uninstalled completely. It appeared in pip as "-ensorboard". Deleting the corresponding dist-info folder in my python environment fixed the problem.

Someone ats(@) me. I always used conda to manage my Python environment. So if I met the problem that I could not uninstall it successfully, I would delete the environment and restart a new one. I hope this helps.

I had this issue in colab. Resolved by uninstalling the current tensorboard and installing tf-nightly

!pip uninstall tensorboard
!pip install -U transformers torch torchvision tensorboardX tf-nightly grpcio==1.24.3

@Biaocsu, I also met the problem but I fixed it. My method is:

  1. I downloaded a test script from https://raw.githubusercontent.com/tensorflow/tensorboard/master/tensorboard/tools/diagnose_tensorboard.py
  2. I run it and it told me that I have two tensorboards with a different version. Also, it told me how to fix it.
  3. I followed its instructions and I can make my tensorboard work.

I think this error means that you have two tensorboards installed so the plugin will be duplicated. Another method would be helpful that is to reinstall the python environment using conda.

Hope to help you.

I have tensorflow 1.14 for python2 and tensorflow 2.0 for python3, this scrip doesn't have any actions suggestions. Does it mean that my enviroment of tensorflow has no problem?

here is the diagnose log:

Diagnostics


Diagnostics output

``````
--- check: autoidentify
INFO: diagnose_tensorboard.py version 4725c70c7ed724e2d1b9ba5618d7c30b957ee8a4

--- check: general
INFO: sys.version_info: sys.version_info(major=3, minor=6, micro=8, releaselevel='final', serial=0)
INFO: os.name: posix
INFO: os.uname(): posix.uname_result(sysname='Linux', nodename='mrt214', release='4.15.0-48-generic', version='#51-Ubuntu SMP Wed Apr 3 08:28:49 UTC 2019', machine='x86_64')
INFO: sys.getwindowsversion(): N/A

--- check: package_management
INFO: has conda-meta: False
INFO: $VIRTUAL_ENV: '/home/zwang/env'

--- check: installed_packages
Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 183, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/usr/lib/python3.6/runpy.py", line 142, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/usr/lib/python3.6/runpy.py", line 109, in _get_module_details
__import__(pkg_name)
File "/usr/lib/python3/dist-packages/pip/__init__.py", line 29, in
from pip.utils import get_installed_distributions, get_prog
File "/usr/lib/python3/dist-packages/pip/utils/__init__.py", line 30, in
from pip._vendor.retrying import retry
ModuleNotFoundError: No module named 'pip._vendor.retrying'
Traceback (most recent call last):
File "tensorboarddebug.py", line 420, in main
suggestions.extend(check())
File "tensorboarddebug.py", line 165, in installed_packages
freeze = pip(["freeze", "--all"]).decode("utf-8").splitlines()
File "tensorboarddebug.py", line 104, in pip
return subprocess.check_output(command)
File "/usr/lib/python3.6/subprocess.py", line 356, in check_output
**kwargs).stdout
File "/usr/lib/python3.6/subprocess.py", line 438, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/home/zwang/env/bin/python3', '-m', 'pip', '--disable-pip-version-check', 'freeze', '--all']' returned non-zero exit status 1.

--- check: tensorboard_python_version
INFO: tensorboard.version.VERSION: '1.14.0'

--- check: tensorflow_python_version
/home/zwang/.local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint8 = np.dtype([("qint8", np.int8, 1)])
/home/zwang/.local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/home/zwang/.local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint16 = np.dtype([("qint16", np.int16, 1)])
/home/zwang/.local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/home/zwang/.local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint32 = np.dtype([("qint32", np.int32, 1)])
/home/zwang/.local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
np_resource = np.dtype([("resource", np.ubyte, 1)])
/home/zwang/.local/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:541: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint8 = np.dtype([("qint8", np.int8, 1)])
/home/zwang/.local/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:542: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/home/zwang/.local/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:543: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint16 = np.dtype([("qint16", np.int16, 1)])
/home/zwang/.local/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:544: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/home/zwang/.local/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:545: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint32 = np.dtype([("qint32", np.int32, 1)])
/home/zwang/.local/lib/python3.6/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:550: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
np_resource = np.dtype([("resource", np.ubyte, 1)])
INFO: tensorflow.__version__: '1.14.0'
INFO: tensorflow.__git_version__: 'v1.14.0-rc1-22-gaf24dc91b5'

--- check: tensorboard_binary_path
INFO: which tensorboard: b'/home/zwang/.local/bin/tensorboardn'

--- check: readable_fqdn
INFO: socket.getfqdn(): 'mrt214.mrt.uni-karlsruhe.de'

--- check: stat_tensorboardinfo
INFO: directory: /tmp/.tensorboard-info
INFO: .tensorboard-info directory does not exist

--- check: source_trees_without_genfiles
INFO: tensorboard_roots (2): ['/home/zwang/.local/lib/python3.6/site-packages', '/usr/local/lib/python3.6/dist-packages']; bad_roots (0): []

--- check: full_pip_freeze
Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 183, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/usr/lib/python3.6/runpy.py", line 142, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/usr/lib/python3.6/runpy.py", line 109, in _get_module_details
__import__(pkg_name)
File "/usr/lib/python3/dist-packages/pip/__init__.py", line 29, in
from pip.utils import get_installed_distributions, get_prog
File "/usr/lib/python3/dist-packages/pip/utils/__init__.py", line 30, in
from pip._vendor.retrying import retry
ModuleNotFoundError: No module named 'pip._vendor.retrying'
Traceback (most recent call last):
File "tensorboarddebug.py", line 420, in main
suggestions.extend(check())
File "tensorboarddebug.py", line 77, in wrapper
result = fn()
File "tensorboarddebug.py", line 388, in full_pip_freeze
logging.info("pip freeze --all:n%s", pip(["freeze", "--all"]).decode("utf-8"))
File "tensorboarddebug.py", line 104, in pip
return subprocess.check_output(command)
File "/usr/lib/python3.6/subprocess.py", line 356, in check_output
**kwargs).stdout
File "/usr/lib/python3.6/subprocess.py", line 438, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/home/zwang/env/bin/python3', '-m', 'pip', '--disable-pip-version-check', 'freeze', '--all']' returned non-zero exit status 1.
``````

Next steps

No action items identified. Please copy ALL of the above output,
including the lines containing only backticks, into your GitHub issue
or comment. Be sure to redact any sensitive information.

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)

how do you selectively remove one version of tensorboard

Next steps

No action items identified. Please copy ALL of the above output,
including the lines containing only backticks, into your GitHub issue
or comment. Be sure to redact any sensitive information.

@Biaocsu, I also met the problem but I fixed it. My method is:

  1. I downloaded a test script from https://raw.githubusercontent.com/tensorflow/tensorboard/master/tensorboard/tools/diagnose_tensorboard.py
  2. I run it and it told me that I have two tensorboards with a different version. Also, it told me how to fix it.
  3. I followed its instructions and I can make my tensorboard work.

I think this error means that you have two tensorboards installed so the plugin will be duplicated. Another method would be helpful that is to reinstall the python environment using conda.

Hope to help you.

I solved my problem. Thanks a lot!

I fix the issue by following steps:

  • pip uninstall tb-nightly tensorboardX tensorboard
  • pip install tensorboard

I had this issue in colab. Resolved by uninstalling the current tensorboard and installing tf-nightly

!pip uninstall tensorboard
!pip install -U transformers torch torchvision tensorboardX tf-nightly grpcio==1.24.3

I will throw my $0.02 in and remind you to also
!conda remove tensorboard

If you're running in a windows environment!

Hello, I had the same problem today, and I fixed with the following simple steps:
I navigated to the directory from where the error was coming from - site-packages - tensorboard.
Since, tensorflow object detection API 's tf.contrib does not work in tensorflow 2.0, I had tensorflow 1.14 installed in my computer to run the detection model.
So, when I navigated to the directory 'tensorboard' inside site-packages - I found "tensorboar-2.0.2.dist-info, and tensorflow_estimator-2.0.2.dist-info'. I removed these files from the directory, and the problem was solved.

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)

After running this code, I got the output below:

-ensorboard 2.0.2
tensorboard 2.0.0

Does it mean I have two tensorboard installed?

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)

After running this code, I got the output below:

-ensorboard 2.0.2
tensorboard 2.0.0

Does it mean I have two tensorboard installed?

Solved!
I deleted the tensorboard-2.0.0.dist-info folder from Lib/site-packages then tensorboard works.
But I don't know whether it would cause another problem or not.

I was also thinking the same, if some error pops up, however, none faced so far...
The safest way is to not delete, however, keep the files somewhere else... as python searches the file in that specific folder only, and gets confused :)

in my case, i uninstalled tensorboard-plugin-wit, and it works.

in my case, i uninstalled tensorboard-plugin-wit, and it works.

It worked it to me as well. Thank you!
And I couldn't remove package from conda command, so I just manually found the path of the tensorboard-plugin-wit folder and remove that in file directory .

Summing up for latecomers, personally I have met all these errors myself by upgrading and downgrading tensorflow and tensorboard.

Symptom 1 Tensorboard: ValueError: Duplicate plugins for name projector

Download diagnose script:

wget https://raw.githubusercontent.com/tensorflow/tensorboard/master/tensorboard/tools/diagnose_tensorboard.py

Execute it and follow its instruction:

python diagnose_tensorboard.py

Symptom 2 Tensorboard: ValueError: Duplicate plugins for name projector and diagnose script shows no action

Run pip freeze to see if you get this warning WARNING: Could not generate requirement for distribution -ensorboard 2.1.0

If yes, then there is a ghost copy of tensorboard. Hopefully, the fix below has no side effect, I am not sure about it.

cd <site-packages>
rm -rf "~ensorboard"
rm -rf "~ensorboard-2.1.0.dist-info"

Symptom 3: Tensorboard: ValueError: Duplicate plugins for name whatif

pip uninstall tensorboard-plugin-wit

in my case, i uninstalled tensorboard-plugin-wit, and it works.

Worked for me as well, had this issue under Colab

The following solution ALWAYS works for me irrespective of the updates made to tensorboard (eg: The new packagetensorboard-plugin-wit released in Feb 2020, is causing issues to many people here, and there can be other updates in the future).

Add the following code snippet in every colab tutorial before you load tensorboard.

# Remove all TensorBoard packages.
! pip list --format=freeze | grep tensorboard | xargs pip uninstall -y
# Install TensorFlow again (This command will only install the default TensorBoard package associated with this TensorFlow package). 
! pip install -q tensorflow

@Biaocsu, I also met the problem but I fixed it. My method is:

1. I downloaded a test script from https://raw.githubusercontent.com/tensorflow/tensorboard/master/tensorboard/tools/diagnose_tensorboard.py

2. I run it and it told me that I have two tensorboards with a different version. Also, it told me how to fix it.

3. I followed its instructions and I can make my tensorboard work.

I think this error means that you have two tensorboards installed so the plugin will be duplicated. Another method would be helpful that is to reinstall the python environment using conda.

Hope to help you.

VOCE É UM MONSTRO, UM DEUS O MAIS FODA DE TODOS DENTRO DOS OS PROGRAMADORES

Next steps

No action items identified. Please copy ALL of the above output,
including the lines containing only backticks, into your GitHub issue
or comment. Be sure to redact any sensitive information.

same problem

Was this page helpful?
5 / 5 - 1 ratings