Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tensorboard: ValueError: Duplicate plugins for name projector #22676

Closed
Biaocsu opened this issue Jul 10, 2019 · 46 comments
Closed

Tensorboard: ValueError: Duplicate plugins for name projector #22676

Biaocsu opened this issue Jul 10, 2019 · 46 comments
Labels
high priority module: dependency bug Problem is not caused by us, but caused by an upstream library we use module: tensorboard triage review triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Comments

@Biaocsu
Copy link

Biaocsu commented Jul 10, 2019

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`
@ezyang ezyang added module: tensorboard triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module labels Jul 10, 2019
@ezyang
Copy link
Contributor

ezyang commented Jul 10, 2019

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

@huangwl18
Copy link

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

@LU4E
Copy link

LU4E commented Jul 11, 2019

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.

@Biaocsu
Copy link
Author

Biaocsu commented Jul 11, 2019

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

@LU4E
Copy link

LU4E commented Jul 12, 2019

@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.

@Biaocsu
Copy link
Author

Biaocsu commented Jul 12, 2019

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

@YosukeSugiura
Copy link

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

@Biaocsu
Copy link
Author

Biaocsu commented Jul 15, 2019

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

@ElegantLin
Copy link

@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.

@Biaocsu
Copy link
Author

Biaocsu commented Jul 27, 2019

@ElegantLin thanks

@TomorrowIsAnOtherDay
Copy link

TomorrowIsAnOtherDay commented Aug 8, 2019

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?

@ezyang
Copy link
Contributor

ezyang commented Aug 9, 2019

Upgrading priority as this issue seems to be affecting many people

@ezyang ezyang changed the title ValueError: Duplicate plugins for name projector Tensorboard: ValueError: Duplicate plugins for name projector Aug 9, 2019
@lanpa
Copy link
Collaborator

lanpa commented Aug 12, 2019

@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.

@ezyang ezyang added the module: dependency bug Problem is not caused by us, but caused by an upstream library we use label Aug 13, 2019
@ezyang
Copy link
Contributor

ezyang commented Aug 13, 2019

OK, in that case we can close this issue.

@ezyang ezyang closed this as completed Aug 13, 2019
@michaelthwan
Copy link

### 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~

@novog
Copy link

novog commented Oct 2, 2019

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.

@ElegantLin
Copy link

ElegantLin commented Oct 22, 2019

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.

@mmaybeno
Copy link

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

@zheyuanWang
Copy link

zheyuanWang commented Nov 5, 2019

@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 <module>
    from pip.utils import get_installed_distributions, get_prog
  File "/usr/lib/python3/dist-packages/pip/utils/__init__.py", line 30, in <module>
    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/tensorboard\n'

--- 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 <module>
    from pip.utils import get_installed_distributions, get_prog
  File "/usr/lib/python3/dist-packages/pip/utils/__init__.py", line 30, in <module>
    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.

@UnnikrishnanBhargavakurup

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)

@grewe
Copy link

grewe commented Nov 8, 2019

how do you selectively remove one version of tensorboard

@zhongweics
Copy link

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.

@kaen2891
Copy link

kaen2891 commented Dec 2, 2019

@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!

@wj-Mcat
Copy link

wj-Mcat commented Dec 10, 2019

I fix the issue by following steps:

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

@codeninja
Copy link

codeninja commented Jan 22, 2020

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!

@Tan12uja
Copy link

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.

@YuehLinChung
Copy link

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?

@YuehLinChung
Copy link

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.

@Tan12uja
Copy link

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 :)

@sunqiang85
Copy link

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

@Ssong24
Copy link

Ssong24 commented Mar 30, 2020

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 .

@Hoiy
Copy link

Hoiy commented Mar 31, 2020

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

@maciejskorski
Copy link

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

Worked for me as well, had this issue under Colab

@MeghnaNatraj
Copy link

MeghnaNatraj commented Apr 1, 2020

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

@ThomDumont
Copy link

@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

@JadeSure
Copy link

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

@ondraw
Copy link

ondraw commented Jan 14, 2021

my case

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)

  • -nightly
    -b-nightly 2.5.0a20210112
    tensorboard 2.4.0
    tensorboard-plugin-wit 1.7.0

result >
pip uninstall -b-nightly <= can not uninstall

you should direcretly delete folder;
ex>
you find folder ex> python -m site
~-_nightly-2.5.0a20201223.dist-info
~-_nightly-2.5.0a20210112.dist-info
~b_nightly-2.5.0a20201223.dist-info
~b_nightly-2.5.0a20210112.dist-info

delete -rf ~-_nightly-2.5.0a20201223.dist-info
...
...
...
good luck

@glenn-jocher
Copy link

Seeing same error in YOLOv5 docker image in issue ultralytics/yolov5#2573

@xingh15
Copy link

xingh15 commented May 26, 2021

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.

Maybe it works.

  1. Run the following code, and it shows the tensorboard environment installed on your system.
import pkg_resources
for entry_point in pkg_resources.iter_entry_points('tensorboard_plugins'):
    print(entry_point.dist)
  1. In my case, it returns:
tb-nightly 2.5.0a20201121
torch-tb-profiler 0.1.0
tensorboard 2.5.0
tensorboard-plugin-wit 1.8.0
  1. Then follow the steps:
pip uninstall tb-nightly tensorboard
pip install tensorboard

Note: pip can be replaced by conda.

And it works!

Additionally, remote access to Tensorboard:
Remote linux:
tensorboard --logdir="/path/to/log-directory"
Host PC:
ssh -L 16006:127.0.0.1:6006 account@server.address
Access http://127.0.0.1:16006/ in your browser.

@Ascrypto
Copy link

Thank you for the diagnostic script.

Although I have tensorboard 2.7.0 and tensorflow 2.7.0 installed (I am using pycharm) in a virtual env, the output of the script says these packages are not installed.

Diagnostics

Diagnostics output
--- check: autoidentify
--- check: general
INFO: sys.version_info: sys.version_info(major=3, minor=8, micro=0, releaselevel='final', serial=0)
INFO: os.name: posix

--- check: package_management
INFO: has conda-meta: False
INFO: $VIRTUAL_ENV: None

--- check: installed_packages
WARNING: The directory '/home/ubuntu/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.
WARNING: no installation among: ['tb-nightly', 'tensorboard', 'tensorflow-tensorboard']
WARNING: no installation among: ['tensorflow', 'tensorflow-gpu', 'tf-nightly', 'tf-nightly-2.0-preview', 'tf-nightly-gpu', 'tf-nightly-gpu-2.0-preview']
WARNING: no installation among: ['tensorflow-estimator', 'tensorflow-estimator-2.0-preview', 'tf-estimator-nightly']

--- check: tensorboard_python_version
Traceback (most recent call last):
  File "test.py", line 522, in main
    suggestions.extend(check())
  File "test.py", line 75, in wrapper
    result = fn()
  File "test.py", line 271, in tensorboard_python_version
    from tensorboard import version
ModuleNotFoundError: No module named 'tensorboard'

--- check: tensorflow_python_version
Traceback (most recent call last):
  File "test.py", line 522, in main
    suggestions.extend(check())
  File "test.py", line 75, in wrapper
    result = fn()
  File "test.py", line 278, in tensorflow_python_version
    import tensorflow as tf
ModuleNotFoundError: No module named 'tensorflow'

--- check: tensorboard_data_server_version
INFO: no data server installed

--- check: tensorboard_binary_path
INFO: which tensorboard: b'/usr/local/bin/tensorboard\n'

--- check: stat_tensorboardinfo
INFO: directory: /tmp/.tensorboard-info

--- check: source_trees_without_genfiles
INFO: tensorboard_roots (0): []; bad_roots (0): []

--- check: full_pip_freeze
WARNING: The directory '/home/ubuntu/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.
INFO: pip freeze --all:
tenacity==8.0.1
terminado==0.12.1
testpath==0.5.0
textwrap3==0.9.2
toml==0.10.2
tomli==1.2.2
torch==1.5.1
tornado==6.1
tqdm==4.62.3
traitlets==5.1.1
Twisted==17.9.0
typing-extensions==3.10.0.2

Next steps

Note: no suggestions were provided on how to fix it.

any suggestion would be helpful. ( I tried all of the above solutions, to no avail.)

@eshwarkamal
Copy link

@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.

Thanks a lot, the problem was resolved successfully! ;) @ElegantLin

@Hqm10790
Copy link

Hqm10790 commented Oct 9, 2022

i resolved by uninstalling tensorboard ,tensorboard-data-server ,tensorboard-plugin-wit , tb-nightly
and then pip install tensorboard in terminal, hope to help u

@tboulet
Copy link

tboulet commented Apr 25, 2023

I had a strange package installed in my libs named "~ensorboard" and "~ensorboard-2.12.0.dist-info"
I went in my_venv\Lib\site-packages and deleted them

@peterhchen
Copy link

@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.

Thanks a lot.
https://raw.githubusercontent.com/tensorflow/tensorboard/master/tensorboard/tools/diagnose_tensorboard.py
The script is very helpful to identify that I have the duplicate installation of tensorboard (one came from nighly, one from regular installation). I made mistake and I nver know that. At the end, it show how to remove the duplicate installtion.
I remove sveral times and finally clean the nightly version.
Then, I reinstall the tensorflow.

@hungle-i3
Copy link

hungle-i3 commented Dec 15, 2023

Following command works to me

source /venv/bin/activate && \
pip3 uninstall -y tensorboard tb-nightly && \
pip3 install tensorboard tensorflow && \
pip3 cache purge && \
deactivate

@sh-taheri
Copy link

Hi, in my case, for some reason when ,in my conda environment, I ran "tensorboard --logdir=runs" I got the same error, because it was using my base environment. I used "/path/to/my/conda/env/bin/tensorboard --logdir=path/to/my/logs" instead and the issue was resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
high priority module: dependency bug Problem is not caused by us, but caused by an upstream library we use module: tensorboard triage review triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

No branches or pull requests