Tensorboard in virtualenvironment - No module named 'tensorboard'

I am new to PyThorch and I am trying to go through the tutorials of the official page.

I am struggling to understand how to run Tensorboard in a python notebook. I was trying first to do it in a google colab and understood that it is maybe better to first try to run it in a local python notebook. I am following this tutorial .

I am on an Ubuntu 16.04 machine and I am using virtualenvironment. I did not find a good guide to set up a python notebook (.ipynb) yet.

For now, when I arrive at the command:
from torch.utils.tensorboard import SummaryWriter

I get the error:

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
~/deepLearning/lib/python3.5/site-packages/torch/utils/tensorboard/__init__.py in 
      1 try:
----> 2     from tensorboard.summary.writer.record_writer import RecordWriter  # noqa F401
      3 except ImportError:

ImportError: No module named 'tensorboard'

Anyone would be able to help me? Thanks!

Well you dont seem to have installed tensorboard.

Try running

pip install tensorboard

1 Like

Thanks for your answer. I had tensorboard installed. However, what I did was

pip uninstall tensorflow
pip uninstall tensorboard

I deactivated my virtualenv, reactivated it

pip install tensorflow
pip install tensorboard

And now it is working fine

2 Likes