AttributeError: module 'tensorboard.util' has no attribute 'PersistentOpEvaluator' , when trying to use TensorBoard

*爱你&永不变心* 提交于 2019-12-12 14:58:16

问题


I made some log files using tensorboard but I can't access them.

Using

tensorboard or tensorboard --logdir=logs/ on the command prompt

gives the following error:-

C:\Users\User>tensorboard
Traceback (most recent call last):
  File "C:\Users\User\Anaconda3\Scripts\tensorboard-script.py", line 6, in <module>
    from tensorboard.main import run_main
  File "C:\Users\User\Anaconda3\lib\site-packages\tensorboard\main.py", line 40, in <module>
    from tensorboard import default
  File "C:\Users\User\Anaconda3\lib\site-packages\tensorboard\default.py", line 38, in <module>
    from tensorboard.plugins.beholder import beholder_plugin
  File "C:\Users\User\Anaconda3\lib\site-packages\tensorboard\plugins\beholder\__init__.py", line 15, in <module>
    from tensorboard.plugins.beholder.beholder import Beholder
  File "C:\Users\User\Anaconda3\lib\site-packages\tensorboard\plugins\beholder\beholder.py", line 25, in <module>
    from tensorboard.plugins.beholder import im_util
  File "C:\Users\User\Anaconda3\lib\site-packages\tensorboard\plugins\beholder\im_util.py", line 89, in <module>
    class PNGDecoder(util.PersistentOpEvaluator):
AttributeError: module 'tensorboard.util' has no attribute 'PersistentOpEvaluator'

I tried this solution, but it did not help.


回答1:


I also had a big fight with this problem. What eventually worked for me was the following:

  1. pip uninstall tensorflow
  2. pip uninstall tensorboard
  3. conda show OR pip show --> have a look at which other tensorflow related packages you have installed and remove them.
  4. Go to site-packages and remove tensorflow/tensorboard folders (look for any folder in your filesystem related to a tensorflow / tensorboard installation)
  5. conda clean --all (not sure if this is necessary, but it was one of my steps and might be relevant)
  6. Reinstall tensorflow and tensorboard. Preferably use conda as it is faster by several orders of magnitude

One of my main sources in solving this issue was this github issue thread: https://github.com/tensorflow/tensorboard/issues/1724



来源:https://stackoverflow.com/questions/53966020/attributeerror-module-tensorboard-util-has-no-attribute-persistentopevaluato

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!