question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AttributeError: module 'tensorboard' has no attribute 'lazy'

See original GitHub issue
  • Tensorboard version: 1.12.2
  • Tensorflow version: tf-nightly-2.0-preview==2.0.0.dev20190216
  • OS: MacOS Mojave
  • Python version: 3.6.5

Training a simple model with tf.keras in the latest tf-nightly-2.0-preview will result in the following error even without using any Tensorboard callback during training:

  File "/Users/thms/.virtualenvs/tf2/bin/tensorboard", line 6, in <module>
    from tensorboard.main import run_main
  File "/Users/thms/.virtualenvs/tf2/lib/python3.6/site-packages/tensorboard/main.py", line 45, in <module>
    from tensorboard import default
  File "/Users/thms/.virtualenvs/tf2/lib/python3.6/site-packages/tensorboard/default.py", line 34, in <module>
    import tensorflow as tf
  File "/Users/thms/.virtualenvs/tf2/lib/python3.6/site-packages/tensorflow/__init__.py", line 30, in <module>
    from tensorflow._api.v2 import compat
  File "/Users/thms/.virtualenvs/tf2/lib/python3.6/site-packages/tensorflow/_api/v2/compat/__init__.py", line 22, in <module>
    from tensorflow._api.v2.compat import v2
  File "/Users/thms/.virtualenvs/tf2/lib/python3.6/site-packages/tensorflow/_api/v2/compat/v2/__init__.py", line 306, in <module>
    "Limited tf.compat.v2.summary API due to missing TensorBoard "
  File "/Users/thms/.virtualenvs/tf2/lib/python3.6/site-packages/tensorflow/python/tools/component_api_helper.py", line 56, in package_hook
    child_pkg = importlib.import_module(child_package_str)
  File "/Users/thms/.virtualenvs/tf2/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/Users/thms/.virtualenvs/tf2/lib/python3.6/site-packages/tensorboard/summary/__init__.py", line 32, in <module>
    from tensorboard.summary import v2
  File "/Users/thms/.virtualenvs/tf2/lib/python3.6/site-packages/tensorboard/summary/v2.py", line 24, in <module>
    from tensorboard.plugins.audio.summary_v2 import audio
  File "/Users/thms/.virtualenvs/tf2/lib/python3.6/site-packages/tensorboard/plugins/audio/summary_v2.py", line 30, in <module>
    from tensorboard.compat import tf2 as tf
  File "/Users/thms/.virtualenvs/tf2/lib/python3.6/site-packages/tensorboard/compat/__init__.py", line 28, in <module>
    import tensorboard.lazy as _lazy
AttributeError: module 'tensorboard' has no attribute 'lazy'

Is there a specific tensorboard build to use with the TF2.0 preview?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

23reactions
lenjoycommented, Feb 20, 2021

if using pip, somehow the order of tensorflow-tensorboard and tensorboard matter…

pip install tensorflow-tensorboard==1.5.1

then

pip install tensorboard==1.14.0

this will be solved

21reactions
wchargincommented, Aug 16, 2019

@lenjoy: The tensorflow-tensorboard distribution is a relic of a bygone era; there’s no need to install it anymore. As noted on the PyPI page

NOTICE: This PyPI entry has been deprecated in favor of the tensorboard name found at https://pypi.python.org/pypi/tensorboard for TensorBoard 1.6.0+. Only bugfix updates on 1.5.x will be applied to this old package name.

To upgrade past the version shown on this page, please ensure that you first pip uninstall tensorflow-tensorboard and then pip install tensorboard.

Read more comments on GitHub >

github_iconTop Results From Across the Web

AttributeError: module 'tensorboard' has no attribute 'lazy'
Uninstalling and reinstalling all tensorflow and tensorboard libraries using pip and then restarting computer. The top answer here. Any ideas?
Read more >
AttributeError: module 'tensorboard' has no attribute ... - AI Pool
I'm using tensorboard, but getting this error. import tensorboard.lazy as _lazy AttributeError: module 'tensorboard' has no attribute 'lazy'.
Read more >
module 'tensorboard.lazy' has no attribute 'lazy_load'
attributeerror : module 'tensorboard.lazy' has no attribute 'lazy_load' · Oops, You will need to install Grepper and log-in to perform this action.
Read more >
问题module 'tensorboard-lazy' has no attribute 'lazy' - CSDN博客
问题:AttributeError: module 'tensorboard-lazy' has no attribute 'lazy'解决办法:1 打开cmd,激活环境。2 先卸载安装的tensorboard ...
Read more >
AttributeError: module 'tensorflow' has no attribute 'placeholder'
The cause of the mentioned problem is incompatibile code with installed tensorflow library. In this case you have code compatible with tensorflow 1.0 ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found