终端调用tensorboard时报错如下:
raise ValueError('Duplicate plugins for name %s' % plugin.plugin_name)
ValueError: Duplicate plugins for name projector`
这个问题主要是因为环境中安装了多个tensorboard造成了冲突。
可以检测系统的环境是否安装了多个版本的tensorboard或者tensorflow,会根据结果提示应该怎么解决。
# Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
"""Self-diagnosis script for TensorBoard.
Instructions: Save this script to your local machine, then execute it in
the same environment (virtualenv, Conda, etc.) from which you normally
run TensorBoard. Read the output and follow the directions.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
# This script may only depend on the Python standard library. It is not
# built with Bazel and should not assume any third-party dependencies.
import collections
import errno
import functools
import hashlib
import inspect
import logging
import os
import pipes
import shlex
import socket
import subprocess
import sys
import tempfile
import textwrap
import traceback
# A *check* is a function (of no arguments) that performs a diagnostic,
# writes log messages, and optionally yields suggestions. Each check
# runs in isolation; exceptions will be caught and reported.
CHECKS = []
# A suggestion to the end user.
# headline (str): A short description, like "Turn it off and on
# again". Should be imperative with no trailing punctuation. May
# contain inline Markdown.
# description (str): A full enumeration of the steps that the user
# should take to accept the suggestion. Within this string, prose
# should be formatted with `reflow`. May contain Markdown.
Suggestion = collections.namedtuple("Suggestion", ("headline", "description"))
def check(fn):
"""Decorator to register a function as a check.
Checks are run in the order in which they are registered.
Args:
fn: A function that takes no arguments and either returns `None` or
returns a generator of `Suggestion`s. (The ability to return
`None` is to work around the awkwardness of defining empty
generator functions in Python.)
Returns:
A wrapped version of `fn` that returns a generator of `Suggestion`s.
"""
@functools.wraps(fn)
def wrapper():
result = fn()
return iter(()) if result is None else result
CHECKS.append(wrapper)
return wrapper
def reflow(paragraph):
return textwrap.fill(textwrap.dedent(paragraph).strip())
def pip(args):
"""Invoke command-line Pip with the specified args.
Returns:
A bytestring containing the output of Pip.
"""
# Suppress the Python 2.7 deprecation warning.
PYTHONWARNINGS_KEY = "PYTHONWARNINGS"
old_pythonwarnings = os.environ.get(PYTHONWARNINGS_KEY)
new_pythonwarnings = "%s%s" % (
"ignore:DEPRECATION",
",%s" % old_pythonwarnings if old_pythonwarnings else "",
)
command = [sys.executable, "-m", "pip", "--disable-pip-version-check"]
command.extend(args)
try:
os.environ[PYTHONWARNINGS_KEY] = new_pythonwarnings
return subprocess.check_output(command)
finally:
if old_pythonwarnings is None:
del os.environ[PYTHONWARNINGS_KEY]
else:
os.environ[PYTHONWARNINGS_KEY] = old_pythonwarnings
def which(name):
"""Return the path to a binary, or `None` if it's not on the path.
Returns:
A bytestring.
"""
binary = "where" if os.name == "nt" else "which"
try:
return subprocess.check_output([binary, name])
except subprocess.CalledProcessError:
return None
def sgetattr(attr, default):
"""Get an attribute off the `socket` module, or use a default."""
sentinel = object()
result = getattr(socket, attr, sentinel)
if result is sentinel:
print("socket.%s does not exist" % attr)
return default
else:
print("socket.%s = %r" % (attr, result))
return result
@check
def autoidentify():
"""Print the Git hash of this version of `diagnose_tensorboard.py`.
Given this hash, use `git cat-file blob HASH` to recover the
relevant version of the script.
"""
module = sys.modules[__name__]
try:
source = inspect.getsource(module).encode("utf-8")
except TypeError:
logging.info("diagnose_tensorboard.py source unavailable")
else:
# Git inserts a length-prefix before hashing; cf. `git-hash-object`.
blob = b"blob %d\0%s" % (len(source), source)
hash = hashlib.sha1(blob).hexdigest()
logging.info("diagnose_tensorboard.py version %s", hash)
@check
def general():
logging.info("sys.version_info: %s", sys.version_info)
logging.info("os.name: %s", os.name)
na = type("N/A", (object,), {
"__repr__": lambda self: "N/A"})
logging.info(
"os.uname(): %r", getattr(os, "uname", na)(),
)
logging.info(
"sys.getwindowsversion(): %r", getattr(sys, "getwindowsversion", na)(),
)
@check
def package_management():
conda_meta = os.path.join(sys.prefix, "conda-meta")
logging.info("has conda-meta: %s", os.path.exists(conda_meta))
logging.info("$VIRTUAL_ENV: %r", os.environ.get("VIRTUAL_ENV"))
@check
def installed_packages():
freeze = pip(["freeze", "--all"]).decode("utf-8").splitlines()
packages = {
line.split(u"==")[0]: line for line in freeze}
packages_set = frozenset(packages)
# For each of the following families, expect exactly one package to be
# installed.
expect_unique = [
frozenset([u"tensorboard", u"tb-nightly", u"tensorflow-tensorboard",]),
frozenset(
[
u"tensorflow",
u"tensorflow-gpu",
u"tf-nightly",
u"tf-nightly-2.0-preview",
u"tf-nightly-gpu",
u"tf-nightly-gpu-2.0-preview",
]
),
frozenset(
[
u"tensorflow-estimator",
u"tensorflow-estimator-2.0-preview",
u"tf-estimator-nightly",
]
),
]
found_conflict = False
for family in expect_unique:
actual = family & packages_set
for package in actual:
logging.info("installed: %s", packages[package])
if len(actual) == 0:
logging.warning("no installation among: %s", sorted(family))
elif len(actual) > 1:
logging.warning("conflicting installations: %s", sorted(actual))
found_conflict = True
if found_conflict:
preamble = reflow(
"""
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.)
"""
)
packages_to_uninstall = sorted(
frozenset().union(*expect_unique) & packages_set
)
commands = [
"pip uninstall %s" % " ".join(packages_to_uninstall),
"pip install tensorflow # or `tensorflow-gpu`, or `tf-nightly`, ...",
]
message = "%s\n\nNamely:\n\n%s" % (
preamble,
"\n".join("\t%s" % c for c in commands),
)
yield Suggestion("Fix conflicting installations", message)
wit_version = packages.get("tensorboard-plugin-wit")
if wit_version == "tensorboard-plugin-wit==1.6.0.post2":
# This is only incompatible with TensorBoard prior to 2.2.0, but
# we just issue a blanket warning so that we don't have to pull
# in a `pkg_resources` dep to parse the version.
preamble = reflow(
"""
Versions of the What-If Tool (`tensorboard-plugin-wit`)
prior to 1.6.0.post3 are incompatible with some versions of
TensorBoard. Please upgrade this package to the latest
version to resolve any startup errors:
"""
)
command = "pip install -U tensorboard-plugin-wit"
message = "%s\n\n\t%s" % (preamble, command)
yield Suggestion("Upgrade `tensorboard-plugin-wit`", message)
@check
def tensorboard_python_version():
from tensorboard import version
logging.info("tensorboard.version.VERSION: %r", version.VERSION)
@check
def tensorflow_python_version():
import tensorflow as tf
logging.info("tensorflow.__version__: %r", tf.__version__)
logging.info("tensorflow.__git_version__: %r", tf.__git_version__)
@check
def tensorboard_binary_path():
logging.info("which tensorboard: %r", which("tensorboard"))
@check
def addrinfos():
sgetattr("has_ipv6", None)
family = sgetattr("AF_UNSPEC", 0)
socktype = sgetattr("SOCK_STREAM", 0)
protocol = 0
flags_loopback = sgetattr("AI_ADDRCONFIG", 0)
flags_wildcard = sgetattr("AI_PASSIVE", 0)
hints_loopback = (family, socktype, protocol, flags_loopback)
infos_loopback = socket.getaddrinfo(None, 0, *hints_loopback)
print("Loopback flags: %r" % (flags_loopback,))
print("Loopback infos: %r" % (infos_loopback,))
hints_wildcard = (family, socktype, protocol, flags_wildcard)
infos_wildcard = socket.getaddrinfo(None, 0, *hints_wildcard)
print("Wildcard flags: %r" % (flags_wildcard,))
print("Wildcard infos: %r" % (infos_wildcard,))
@check
def readable_fqdn():
# May raise `UnicodeDecodeError` for non-ASCII hostnames:
# https://github.com/tensorflow/tensorboard/issues/682
try:
logging.info("socket.getfqdn(): %r", socket.getfqdn())
except UnicodeDecodeError as e:
try:
binary_hostname = subprocess.check_output(["hostname"]).strip()
except subprocess.CalledProcessError:
binary_hostname = b""
is_non_ascii = not all(
0x20
<= (ord(c) if not isinstance(c, int) else c)
<= 0x7E # Python 2
for c in binary_hostname
)
if is_non_ascii:
message = reflow(
"""
Your computer's hostname, %r, contains bytes outside of the
printable ASCII range. Some versions of Python have trouble
working with such names (https://bugs.python.org/issue26227).
Consider changing to a hostname that only contains printable
ASCII bytes.
"""
% (binary_hostname,)
)
yield Suggestion("Use an ASCII hostname", message)
else:
message = reflow(
"""
Python can't read your computer's hostname, %r. This can occur
if the hostname contains non-ASCII bytes
(https://bugs.python.org/issue26227). Consider changing your
hostname, rebooting your machine, and rerunning this diagnosis
script to see if the problem is resolved.
"""
% (binary_hostname,)
)
yield Suggestion("Use a simpler hostname", message)
raise e
@check
def stat_tensorboardinfo():
# We don't use `manager._get_info_dir`, because (a) that requires
# TensorBoard, and (b) that creates the directory if it doesn't exist.
path = os.path.join(tempfile.gettempdir(), ".tensorboard-info")
logging.info("directory: %s", path)
try:
stat_result = os.stat(path)
except OSError as e:
if e.errno == errno.ENOENT:
# No problem; this is just fine.
logging.info(".tensorboard-info directory does not exist")
return
else:
raise
logging.info("os.stat(...): %r", stat_result)
logging.info("mode: 0o%o", stat_result.st_mode)
if stat_result.st_mode & 0o777 != 0o777:
preamble = reflow(
"""
The ".tensorboard-info" directory was created by an old version
of TensorBoard, and its permissions are not set correctly; see
issue #2010. Change that directory to be world-accessible (may
require superuser privilege):
"""
)
# This error should only appear on Unices, so it's okay to use
# Unix-specific utilities and shell syntax.
quote = getattr(shlex, "quote", None) or pipes.quote # Python <3.3
command = "chmod 777 %s" % quote(path)
message = "%s\n\n\t%s" % (preamble, command)
yield Suggestion('Fix permissions on "%s"' % path, message)
@check
def source_trees_without_genfiles():
roots = list(sys.path)
if "" not in roots:
# Catch problems that would occur in a Python interactive shell
# (where `""` is prepended to `sys.path`) but not when
# `diagnose_tensorboard.py` is run as a standalone script.
roots.insert(0, "")
def has_tensorboard(root):
return os.path.isfile(os.path.join(root, "tensorboard", "__init__.py"))
def has_genfiles(root):
sample_genfile = os.path.join("compat", "proto", "summary_pb2.py")
return os.path.isfile(os.path.join(root, "tensorboard", sample_genfile))
def is_bad(root):
return has_tensorboard(root) and not has_genfiles(root)
tensorboard_roots = [root for root in roots if has_tensorboard(root)]
bad_roots = [root for root in roots if is_bad(root)]
logging.info(
"tensorboard_roots (%d): %r; bad_roots (%d): %r",
len(tensorboard_roots),
tensorboard_roots,
len(bad_roots),
bad_roots,
)
if bad_roots:
if bad_roots == [""]:
message = reflow(
"""
Your current directory contains a `tensorboard` Python package
that does not include generated files. This can happen if your
current directory includes the TensorBoard source tree (e.g.,
you are in the TensorBoard Git repository). Consider changing
to a different directory.
"""
)
else:
preamble = reflow(
"""
Your Python path contains a `tensorboard` package that does
not include generated files. This can happen if your current
directory includes the TensorBoard source tree (e.g., you are
in the TensorBoard Git repository). The following directories
from your Python path may be problematic:
"""
)
roots = []
realpaths_seen = set()
for root in bad_roots:
label = repr(root) if root else "current directory"
realpath = os.path.realpath(root)
if realpath in realpaths_seen:
# virtualenvs on Ubuntu install to both `lib` and `local/lib`;
# explicitly call out such duplicates to avoid confusion.
label += " (duplicate underlying directory)"
realpaths_seen.add(realpath)
roots.append(label)
message = "%s\n\n%s" % (
preamble,
"\n".join(" - %s" % s for s in roots),
)
yield Suggestion(
"Avoid `tensorboard` packages without genfiles", message
)
# Prefer to include this check last, as its output is long.
@check
def full_pip_freeze():
logging.info(
"pip freeze --all:\n%s", pip(["freeze", "--all"]).decode("utf-8")
)
def set_up_logging():
# Manually install handlers to prevent TensorFlow from stomping the
# default configuration if it's imported:
# https://github.com/tensorflow/tensorflow/issues/28147
logger = logging.getLogger()
logger.setLevel(logging.INFO)
handler = logging.StreamHandler(sys.stdout)
handler.setFormatter(logging.Formatter("%(levelname)s: %(message)s"))
logger.addHandler(handler)
def main():
set_up_logging()
print("### Diagnostics")
print()
print("")
print("Diagnostics output ")
print()
markdown_code_fence = "``````" # seems likely to be sufficient
print(markdown_code_fence)
suggestions = []
for (i, check) in enumerate(CHECKS):
if i > 0:
print()
print("--- check: %s" % check.__name__)
try:
suggestions.extend(check())
except Exception:
traceback.print_exc(file=sys.stdout)
pass
print(markdown_code_fence)
print()
print("")
for suggestion in suggestions:
print()
print("### Suggestion: %s" % suggestion.headline)
print()
print(suggestion.description)
print()
print("### Next steps")
print()
if suggestions:
print(
reflow(
"""
Please try each suggestion enumerated above to determine whether
it solves your problem. If none of these suggestions works,
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.
"""
)
)
else:
print(
reflow(
"""
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.
"""
)
)
if __name__ == "__main__":
main()
### Diagnostics
Diagnostics output</summary>
--- check: autoidentify
INFO: diagnose_tensorboard.py version 724b56cee52e7d8eb89bbeec1f0d5ce3e38c9682
--- check: general
INFO: sys.version_info: sys.version_info(major=3, minor=6, micro=5, releaselevel='candidate', serial=1)
INFO: os.name: posix
INFO: os.uname(): posix.uname_result(sysname='Darwin', nodename='192.168.0.101', release='16.7.0', version='Darwin Kernel Version 16.7.0: Sun Jun 2 20:26:31 PDT 2019; root:xnu-3789.73.50~1/RELEASE_X86_64', machine='x86_64')
INFO: sys.getwindowsversion(): N/A
--- check: package_management
INFO: has conda-meta: False
INFO: $VIRTUAL_ENV: None
--- check: installed_packages
INFO: installed: tensorboard==2.3.0
INFO: installed: tb-nightly==2.4.0a20201101
WARNING: conflicting installations: ['tb-nightly', 'tensorboard']
INFO: installed: tf-nightly==2.4.0.dev20201019
INFO: installed: tensorflow==2.3.1
WARNING: conflicting installations: ['tensorflow', 'tf-nightly']
INFO: installed: tensorflow-estimator==2.3.0
INFO: installed: tf-estimator-nightly==2.4.0.dev2020102301
WARNING: conflicting installations: ['tensorflow-estimator', 'tf-estimator-nightly']
--- check: tensorboard_python_version
INFO: tensorboard.version.VERSION: '2.4.0a20201101'
--- check: tensorflow_python_version
INFO: tensorflow.__version__: '2.4.0-dev20201019'
INFO: tensorflow.__git_version__: 'v1.12.1-44021-g861f63a327'
--- check: tensorboard_binary_path
INFO: which tensorboard: b'/Library/Frameworks/Python.framework/Versions/3.6/bin/tensorboard\n'
--- check: addrinfos
socket.has_ipv6 = True
socket.AF_UNSPEC = .AF_UNSPEC: 0>
socket.SOCK_STREAM = .SOCK_STREAM: 1>
socket.AI_ADDRCONFIG = .AI_ADDRCONFIG: 1024>
socket.AI_PASSIVE = .AI_PASSIVE: 1>
Loopback flags: .AI_ADDRCONFIG: 1024>
Loopback infos: [(.AF_INET6: 30>, .SOCK_STREAM: 1>, 6, '', ('::1', 0, 0, 0)), (.AF_INET: 2>, .SOCK_STREAM: 1>, 6, '', ('127.0.0.1', 0))]
Wildcard flags: .AI_PASSIVE: 1>
Wildcard infos: [(.AF_INET6: 30>, .SOCK_STREAM: 1>, 6, '', ('::', 0, 0, 0)), (.AF_INET: 2>, .SOCK_STREAM: 1>, 6, '', ('0.0.0.0', 0))]
--- check: readable_fqdn
INFO: socket.getfqdn(): '192.168.0.101'
--- check: stat_tensorboardinfo
INFO: directory: /var/folders/bx/sh7chqcn7z38yjzwd0wbf20w0000gn/T/.tensorboard-info
INFO: .tensorboard-info directory does not exist
--- check: source_trees_without_genfiles
INFO: tensorboard_roots (1): ['/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages']; bad_roots (0): []
--- check: full_pip_freeze
INFO: pip freeze --all:
absl-py==0.11.0
addict==2.2.0
alfred-py==2.3.9
altgraph==0.17
appnope==0.1.0
argon2-cffi==20.1.0
asn1crypto==0.24.0
astor==0.7.1
astunparse==1.6.3
async-generator==1.10
atomicwrites==1.2.1
attrs==19.1.0
Automat==0.7.0
autopep8==1.4.3
avro-python3==1.9.1
backcall==0.2.0
bleach==3.2.1
bokeh==0.13.0
cachetools==4.1.1
certifi==2020.6.20
cffi==1.14.3
chardet==3.0.4
click==6.7
cloudpickle==1.2.2
colorama==0.4.1
constantly==15.1.0
crcmod==1.7
cryptography==2.3
cssselect==1.0.3
cycler==0.10.0
Cython==0.29.21
dataclasses==0.7
decorator==4.4.2
defusedxml==0.6.0
Deprecated==1.2.4
dill==0.3.1.1
Django==1.11.11
dm-tree==0.1.5
docopt==0.6.2
DPark==0.5.0
efficientnet==1.1.1
efficientnet-pytorch==0.7.0
entrypoints==0.3
fastavro==0.21.24
Flask==1.0.2
Flask-SQLAlchemy==2.3.2
flatbuffers==1.12
future==0.18.2
gast==0.4.0
gevent==1.3.6
google-auth==1.23.0
google-auth-oauthlib==0.4.2
google-pasta==0.2.0
googleapis-common-protos==1.52.0
greenlet==0.4.15
grpcio==1.32.0
h5py==2.10.0
hdfs==2.5.8
html5lib==1.0.1
http-parser==0.8.3
httplib2==0.12.0
hyperlink==18.0.0
idna==2.10
imageio==2.9.0
importlib-metadata==2.0.0
importlib-resources==3.0.0
incremental==17.5.0
ipykernel==5.3.4
ipython==7.16.1
ipython-genutils==0.2.0
ipywidgets==7.4.0
itsdangerous==0.24
jedi==0.17.2
jieba==0.39
Jinja2==2.11.2
joblib==0.13.0
jsonpickle==1.2
jsonschema==3.2.0
jupyter==1.0.0
jupyter-client==6.1.7
jupyter-console==5.2.0
jupyter-contrib-core==0.3.3
jupyter-contrib-nbextensions==0.5.0
jupyter-core==4.6.3
jupyter-highlight-selected-word==0.2.0
jupyter-http-over-ws==0.0.8
jupyter-latex-envs==1.4.6
jupyter-nbextensions-configurator==0.4.1
jupyterlab-pygments==0.1.2
Keras-Applications==1.0.8
Keras-Preprocessing==1.1.2
kiwisolver==1.2.0
labelImg==1.8.1
lxml==4.2.4
macholib==1.14
Markdown==3.3.3
MarkupSafe==1.1.1
matplotlib==3.3.2
mistune==0.8.4
mock==2.0.0
mongoengine==0.15.3
more-itertools==5.0.0
msgpack-python==0.5.6
nbclient==0.5.0
nbconvert==6.0.7
nbformat==5.0.7
neo4j-driver==1.6.2
neotime==1.0.0
nest-asyncio==1.4.1
networkx==2.5
nltk==3.3
nn==0.1.1
notebook==6.1.4
numpy==1.19.3
oauth2client==3.0.0
oauthlib==3.1.0
opencv-contrib-python==4.0.0.21
opencv-python==3.4.2.17
opt-einsum==3.3.0
packaging==20.4
pandas==0.23.4
pandoc==1.0.2
pandocfilters==1.4.2
parsel==1.5.0
parso==0.7.1
pbr==4.2.0
pexpect==4.8.0
pickleshare==0.7.5
Pillow==7.2.0
pip==9.0.1
plotly==3.1.1
pluggy==0.8.0
ply==3.11
prometheus-client==0.8.0
promise==2.3
prompt-toolkit==3.0.7
protobuf==3.13.0
psutil==5.4.7
ptyprocess==0.6.0
py==1.7.0
py-lz4framed==0.12.0
py2neo==4.1.3
py4j==0.10.8.1
pyarmor==6.4.0
pyarmor-webui==1.2.6
pyarrow==0.15.1
pyasn1==0.4.8
pyasn1-modules==0.2.8
pycodestyle==2.4.0
pycparser==2.20
PyDispatcher==2.0.5
pydot==1.4.1
Pygments==2.7.1
PyHamcrest==1.9.0
pyinstaller==4.0
pyinstaller-hooks-contrib==2020.7
pymesos==0.3.7
pymongo==3.10.1
PyMySQL==0.9.2
pyOpenSSL==18.0.0
pyparsing==2.4.7
PyQt5==5.10.1
PyQt5-sip==4.19.13
pyquicklz==1.4.1
pyrsistent==0.17.3
pyspark==2.3.3
pytest==4.0.2
python-dateutil==2.8.1
pytz==2018.5
PyWavelets==1.1.1
PyYAML==3.13
pyzmq==19.0.2
qtconsole==4.3.1
queuelib==1.5.0
redis==2.10.6
requests==2.24.0
requests-oauthlib==1.3.0
resources==0.0.1
retrying==1.3.3
rsa==4.6
scikit-image==0.17.2
scikit-learn==0.19.2
scikit-surprise==1.0.6
scipy==1.4.1
Scrapy==1.5.1
scrapy-redis==0.6.8
seaborn==0.9.0
selenium==3.14.1
Send2Trash==1.5.0
service-identity==17.0.0
setuptools==50.3.2
SimpleCV==1.3
simplegeneric==0.8.1
sip==4.19.8
six==1.15.0
SQLAlchemy==1.2.10
staty==0.5.0
stevedore==1.29.0
surprise==0.1
tb-nightly==2.4.0a20201101
tensorboard==2.3.0
tensorboard-plugin-wit==1.7.0
tensorboardX==1.8
tensorflow==2.3.1
tensorflow-datasets==3.0.0
tensorflow-estimator==2.3.0
tensorflow-hub==0.9.0
tensorflow-metadata==0.24.0
termcolor==1.1.0
terminado==0.9.1
testpath==0.4.4
tf-estimator-nightly==2.4.0.dev2020102301
tf-nightly==2.4.0.dev20201019
tf-slim==1.1.0
Theano==1.0.2
tifffile==2020.9.3
torch==1.6.0
torchvision==0.5.0
tornado==6.0.4
tqdm==4.50.0
traitlets==4.3.3
Twisted==18.7.0
typing==3.7.4.1
typing-extensions==3.7.4.2
urllib3==1.25.11
virtualenv==16.0.0
virtualenv-clone==0.3.0
virtualenvwrapper==4.8.2
w3lib==1.19.0
wcwidth==0.2.5
webencodings==0.5.1
Werkzeug==1.0.1
wheel==0.35.1
widgetsnbextension==3.4.0
wordcloud==1.5.0
wrapt==1.12.1
xlrd==1.1.0
XlsxWriter==1.1.1
xlwt==1.3.0
zipp==3.4.0
zope.interface==4.5.0
</details>
### 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 tensorflow-estimator tf-estimator-nightly tf-nightly
pip install tensorflow # or `tensorflow-gpu`, or `tf-nightly`, ...
### Next steps
Please try each suggestion enumerated above to determine whether it
solves your problem. If none of these suggestions works, 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.
我的检测结果是确实是安装了多个版本的tensorboard和tensorflow,按照提示卸载并重新安装:
pip uninstall tb-nightly tensorboard tensorflow tensorflow-estimator tf-estimator-nightly tf-nightly
pip install tensorflow # or `tensorflow-gpu`, or `tf-nightly`, ...
问题解决。