本文介绍了张量板:找不到命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我按照此处描述的步骤从源代码在我的 MacBook Pro 10.12.5 上安装了 TensorFlow.https://www.tensorflow.org/install/install_sources

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 本身运行良好,但我无法运行 TensorBoard.tensorboard 似乎没有正确安装.

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

当我尝试运行 tensorboard --logdir=... 时,它说 -bash: tensorboard: command not found.而 locate tensorboard 返回空.

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?

推荐答案

如果其他方法无效,请尝试此方法.它可以帮助您.
1.检查Tensorflow的位置

If no other methods work then try this one. It may help you.
1. check the location of Tensorflow

pip show tensorflow

它会显示类似这样的输出.
...
名称:张量流
版本:1.4.0
位置:/home/abc/xy/.local/lib/python2.7/site-packages
...
2. 转到您从上述输出中获得的位置.

It will show output something like this.
...
Name: tensorflow
Version: 1.4.0
Location: /home/abc/xy/.local/lib/python2.7/site-packages
...
2. Go to that location you get from the above output.

cd /home/abc/xy/.local/lib/python2.7/site-packages

在那里你可以看到一个名为 tensorboard 的目录.

There you can see a directory named tensorboard.

cd tensorboard

3.必须有一个名为main.py"的文件.
4. 执行以下命令启动张量板.

3. There must be a file named 'main.py'.
4. Execute the following command to launch the tensorboard.

python main.py --logdir=/path/to/log_file/

这篇关于张量板:找不到命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-15 21:27