Tensorflow visualizer "Tensorboard" not working under Anaconda

14,750

Solution 1

Actually @Andras Deak helped me with this answer, but according to this github issue link: https://github.com/tensorflow/tensorflow/issues/1790 The anaconda version doesn't work because for some reason the tensorboard is inside of the "backend" directory. you have to navigate yourself to the correct directory and execute the python script, which is:

python ~/anaconda/envs/tensorenv/lib/python3.5/site-packages/tensorflow/tensorboard/backend/tensorboard.py

It worked for me: enter image description here

I'm currently working on a way for a permanent fix, but this is a temporary way to fix it.

EDIT: So actually for the permanent fix, all you need to do is copy tensorboard.py into the outer directory. For me, it was inside of

..../site-packages/tensorflow/tensorboard/backend/tensorboard.py 

into

..../site-packages/tensorflow/tensorboard/tensorboard.py. 

I kept the one in backend, and just copied it over and it seems to work for a scalar_summary display. Let me know if any errors come up guys!

Solution 2

Work it like this command

python /Users/USERNAME/anaconda/envs/tf/lib/python3.5/site-packages/tensorboard/main.py --logdir=./logs/

tensorboard.py is changed to main.py

Share:
14,750
OneRaynyDay
Author by

OneRaynyDay

I work at a trading company, previously at Airbnb. I write some blogs here. Just trying to learn interesting things like everyone else.

Updated on June 09, 2022

Comments

  • OneRaynyDay
    OneRaynyDay almost 2 years

    I'm currently using tensorflow and I want to visualize the effect of the convolutional neural network that I'm writing. However, I can't use tensorboard. I see the tensorboard underneath my conda env as envs/tensorenv/bin/tensorboard (python file). It imports this thing called tensorflow.tensorboard.tensorboard that it can't find.

    (tensorenv)wifi-131-179-39-186:TensorflowTutorial hongshuhong$ tensorboard --logdir=log/
    Traceback (most recent call last):
      File "/Users/hongshuhong/anaconda/envs/tensorenv/bin/tensorboard", line 4, in <module>
        import tensorflow.tensorboard.tensorboard
    ImportError: No module named 'tensorflow.tensorboard.tensorboard'
    
    • I tried looking for the tensorflow.tensorboard.tensorboard but I don't see it anywhere in my directories.
    • I'm using Mac OSX distro of tensorflow under anaconda, using python 3.5.1 and using anaconda's packages.
    • I'm using ipython notebook for the code for the convnet.

    Any help would be appreciated. Let me know if extra information is needed, thanks.

  • Dmitry
    Dmitry over 6 years
    My ~/anaconda/envs/ folder is empty :( What's wrong with it?
  • saul gold
    saul gold almost 5 years
    try ~/miniconda3/envs/