tensorboard: command not found

Viewed 66380

I installed TensorFlow on my MacBook Pro 10.12.5 from source code by steps described here. https://www.tensorflow.org/install/install_sources

TensorFlow itself works well but I cannot run TensorBoard. It seems tensorboard is not installed properly.

When I try running tensorboard --logdir=... it says -bash: tensorboard: command not found. And locate tensorboard returns empty.

Do I need any additional step to install tensorboard?

7 Answers

You could call tensorboard as a python module like this:

python3 -m tensorboard.main --logdir=~/my/training/dir

or add this to your .profile

alias tensorboard='python3 -m tensorboard.main'

If you installed Tensorflow with Virtualenv, then first Check whether you have activated the tensorflow envirnoment or not

If you have activated the tensorflow session then your command prompt will look like this :

tensorflow command prompt

If not, Write the below command and try running tensorboard again.

source ~/tensorflow/bin/activate

tensorboard running

Run this command:

python3 -m tensorboard.main --logdir=logdir

To run directory you can use,

Change =logdir to ="dir/TensorFlow" (Directory path)

Quickest solution -

echo "alias tensorboard='python3 -m tensorboard.main'" >> ~/.bash_profile

After adding this to your .bash_profile you can use

tensorboard --logdir=/path

If you are using pycharm in windows environment this may help: python -m tensorboard.main --logdir=logs

Related