How to get tensorboard working?

username: f3ba
cooked: <p>I installed PyTorch 1.4 (as confimed by <code>torch.__version__</code>) via conda. I was following the tensorboard tutorial, <a href="https://pytorch.org/tutorials/intermediate/tensorboard_tutorial.html#tensorboard-setup" rel="nofollow noopener">https://pytorch.org/tutorials/intermediate/tensorboard_tutorial.html#tensorboard-setup</a>.</p>
<p>But this line:</p>
<pre><code class="lang-auto">from torch.utils.tensorboard import SummaryWriter
</code></pre>
<p>gives me an error:</p>
<pre><code class="lang-auto">---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
/data/cossio/apps/anaconda3/envs/bergtorch/lib/python3.7/site-packages/torch/utils/tensorboard/__init__.py in &lt;module&gt;
      1 try:
----&gt; 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)
&lt;ipython-input-8-2775babaea59&gt; in &lt;module&gt;
----&gt; 1 from torch.utils.tensorboard import SummaryWriter

/data/cossio/apps/anaconda3/envs/bergtorch/lib/python3.7/site-packages/torch/utils/tensorboard/__init__.py in &lt;module&gt;
      2     from tensorboard.summary.writer.record_writer import RecordWriter  # noqa F401
      3 except ImportError:
----&gt; 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.
</code></pre>
<p>Note that I did not install tensorboard separately. I thought it came bundled with pytorch? Am I supposed to install it? How?</p>

username: f3ba
cooked: <p>Maybe I have to install tensorboard, but this was not mentioned on the tutorial (or I missed it) and I assumed it was supposed to be available by default when I installed pytorch.</p>
<p>If I must install tensorboard, can I do it through conda? What’s the correct command?</p>

username: JonathanSum
cooked: <p>Before a professional person comes here to explain, check out my TensorBoard Colab example!<br>
In fact, there are many hack around for Tensorboard for Pytorch that works!</p>
<p><a href="https://colab.research.google.com/drive/18WgFrJAf7JF9SGaVV12P9OjoSVapD81R" class="onebox" target="_blank" rel="nofollow noopener">https://colab.research.google.com/drive/18WgFrJAf7JF9SGaVV12P9OjoSVapD81R</a></p>
<p>If you are not using it on colab, you can check this one out to install: <a href="https://github.com/yunjey/pytorch-tutorial/tree/master/tutorials/04-utils/tensorboard" rel="nofollow noopener">https://github.com/yunjey/pytorch-tutorial/tree/master/tutorials/04-utils/tensorboard</a></p>
<p>Please feel free to make a comment on my colab if you want to give an suggestion <img src="https://discuss.pytorch.org/images/emoji/apple/sparkling_heart.png?v=9" title=":sparkling_heart:" class="emoji" alt=":sparkling_heart:"></p>

username: f3ba
cooked: <p>Thanks. I am not using colab.</p>
<aside class="quote no-group" data-username="JonathanSum" data-post="3" data-topic="68228">
<div class="title">
<div class="quote-controls"></div>
<img loading="lazy" alt="" width="24" height="24" src="https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/jonathansum/48/54067_2.png" class="avatar"> JonathanSum:</div>
<blockquote>
<p>If you are not using it on colab, you can check this one out to install: <a href="https://github.com/yunjey/pytorch-tutorial/tree/master/tutorials/04-utils/tensorboard" rel="noopener nofollow ugc">https://github.com/yunjey/pytorch-tutorial/tree/master/tutorials/04-utils/tensorboard</a></p>
</blockquote>
</aside>
<p>Unfortunately this uses pip. I would like to use <code>conda</code> if possible. But before messing with my environment I would like to be sure that I have to install tensorboard separately? Because I thought it was supposed to come bundled with pytorch 1.4.</p>

username: f3ba
cooked: <p>For future reference, I had to install <code>tensorboard</code> via:</p>
<pre><code class="lang-auto">conda install -c anaconda tensorboard
</code></pre>