Starting Tensorboard in a Jupyter notebook with a venv kernel
Install Tensorboard
Install Tensorboard in the same venv you will use in the Jupyter notebook
pip install jupyter-tensorboard
Note: If jupyter is already running when installing this package, you have to restart the Jupyter server.
Start Tensorboard in the Jupyter notebook
You can use the jupyter magic for it
%load_ext tensorboard
%tensorboard --logdir {logs_base}
pidfile for Tensorboard process (Windows)
I had the problem that Tensorboard tried to reuse an old instance that it thought still running. It turns out, that each Tensorboard process creates an Unix-style pidfile in %TEMP%\.tensorboard-info
, which usually get’s deleted before the kernel is terminated. But was still in the folder even though no python processes were running anymore. After deleting this file, a new process did start without a problem.
Source: Shengpeng Liu on Github