Run tensorboard

I installed pip install tb-nightly
I’m trying to visualize the code

from torch.utils.tensorboard import SummaryWriter
writer = SummaryWriter(log_dir='./logs')
x = range(100)
for i in x:
    writer.add_scalar('y=2x', i * 2, i)

The documentation says the command tensorboard --logdir=logs

But getting an error tensorboard --logdir=logs ^ SyntaxError: can't assign to operator

How it works?

It might be related to this thread. Are you running the command inside a bash terminal?