I installed PyTorch 1.4 (as confimed by torch.__version__
) via conda. I was following the tensorboard tutorial, https://pytorch.org/tutorials/intermediate/tensorboard_tutorial.html#tensorboard-setup.
But this line:
from torch.utils.tensorboard import SummaryWriter
gives me an error:
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
/data/cossio/apps/anaconda3/envs/bergtorch/lib/python3.7/site-packages/torch/utils/tensorboard/__init__.py in <module>
1 try:
----> 2 from tensorboard.summary.writer.record_writer import RecordWriter # noqa F401
3 except ImportError:
ModuleNotFoundError: No module named 'tensorboard'
During handling of the above exception, another exception occurred:
ImportError Traceback (most recent call last)
<ipython-input-8-2775babaea59> in <module>
----> 1 from torch.utils.tensorboard import SummaryWriter
/data/cossio/apps/anaconda3/envs/bergtorch/lib/python3.7/site-packages/torch/utils/tensorboard/__init__.py in <module>
2 from tensorboard.summary.writer.record_writer import RecordWriter # noqa F401
3 except ImportError:
----> 4 raise ImportError('TensorBoard logging requires TensorBoard with Python summary writer installed. '
5 'This should be available in 1.14 or above.')
6 from .writer import FileWriter, SummaryWriter # noqa F401
ImportError: TensorBoard logging requires TensorBoard with Python summary writer installed. This should be available in 1.14 or above.
Note that I did not install tensorboard separately. I thought it came bundled with pytorch? Am I supposed to install it? How?