'tensorboard' is not recognized as an internal or external command,

22,000

Solution 1

I had the same problem for tensorflow 1.5.0 and windows10.

Following tensor documentation ("Launching TensorBoard" section), you can try:

python -m tensorboard.main --logdir=[PATH_TO_LOGDIR]

Now tensorboard is working properly for me.

Solution 2

  1. Open Anaconda prompt
  2. activate tensorflow environment e.g. activate Test1-Tensor

    enter image description here

  3. tensorboard --logdir=path to your log files, put entire path. e.g.

    enter image description here

Solution 3

I had the same error and this is what I did.

The best way to open tensorboard on Windows on a specified port is

Step 1: Open CMD

Step 2: Type the following command

python -m tensorboard.main --logdir=<path to log file> --port=6006

The --logdir option is to specify the log location for tensorboard and --port option is to specify the port on which you want tensorboard to run.

I have chosen port 6006 for tensorboard which used to be the default port. (I got an error when I didn't specify the port).

You will get a warning if CUDA is not installed on your machine, for now it can be ignored.

Step 3: Once the command successfully executes the output looks like this

Serving TensorBoard on localhost; to expose to the network, use a proxy or pass --bind_all
TensorBoard 2.2.0 at http://localhost:6006/ (Press CTRL+C to quit)

Step 4: Just open your browser to http://localhost:6006/

Solution 4

How to open launch TensorBoard with Anaconda Enviroment

First make sure that you are downloaded PACKAGE of tensorboard

1. Open Anaconda

enter image description here

2. Click on PLAY button , then you will see "Open Terminal" and click 3. Go to your main project directory (where you store logs directory)

enter image description here

4. Call following python script to launch TensorBoard

#EXAMPLE (python -m tensorboard.main --logdir=logs/)
python -m tensorboard.main --logdir='your log dir'

5. FINISH enter image description here

Solution 5

I also had the same sort of problem while running tensorboard from cmd, if your tensorflow installation was done using conda, then you can launch tensorboard from the Anaconda prompt as follows:

activate tensorflow
tensorboard --logdir=path to your log files
Share:
22,000
TRex
Author by

TRex

Updated on July 20, 2022

Comments

  • TRex
    TRex almost 2 years

    Just started using Tensorflow, but I am not able to use tensorboard command on my cmd, it gives the error command

    C:\Users\tushar\PycharmProjects>tensorboard --logdir="NewTF"
    'tensorboard' is not recognized as an internal or external command,
     operable program or batch file.
    

    I am using window 10 and have installed tensorboard library/

  • jpaugh
    jpaugh over 6 years
    Welcome to Stack Overflow! I don't know if your answer would solve the OP's problem, but I do know that communication is just as important here. Putting the actions before the "I had the same problem..." bit makes it easier to read, and less likely to get closed as "not really an answer."
  • Raksha
    Raksha almost 6 years
    @RoB what is this path_to_logrid? where do I find it?
  • RoB
    RoB almost 6 years
    For your training process you can define some path: path2logdir = "some/path" . Next you define a writer: writer = tf.summary.FileWriter(path2logdir, sess.graph) and within training process you can save some useful stats: writer.add_summary(train_stats, iteration) where train_stats is a result from training process wanted to see in tensorboard. I hope everything is clear now.
  • Nicolas M.
    Nicolas M. over 5 years
    Thanks for the fix. I also realized that instead of opening Anaconda prompt, I can use normal one but I have to go to C:/Users/myName before to call tensorboard --logdir=path
  • Upulie Han
    Upulie Han about 3 years
    According to the question, tensorboard isn't recognized in command prompt.