今天在复现GitHub上的项目时,出现了ERROR: Could not find "tensorboard". Please ensure that your PATH contains an executable "tensorboard" program, or explicitly specify the path to a TensorBoard binary by setting the "TENSORBOARD_BINARY"environment variable.
的错误。这个错误信息表明系统无法找到 tensorboard 程序
1. 确认 TensorBoard 是否已安装
首先,确认是否已经安装了 TensorBoard。
pip show tensorboard
TensorBoard 通常会随着 TensorFlow 的安装而一起安装。如果安装的是PyTorch,TensorBoard需要另外安装
pip install tensorboard
2.添加环境变量
找到tensorboard.exe文件所在的位置。当前虚拟环境位置下的Scripts
文件夹里
# 查看虚拟环境位置
conda info -e
我的位置如下:
添加成功后重新运行jupyter程序,成功加载出tensorboard!!