question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ImportError: cannot import name 'SummaryWriter'

See original GitHub issue

I do not use anaconda, I install tensorboard-pytorch and tensorflow py pip in the virtual enviroment.

I tried, from tensorboard import SummaryWriter, it complains as the title. However, I find the SummaryWriter is in the writer.py in tensorboard, so I have to use from tensorboard.writer import SummaryWriter. Where am I wrong?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

5reactions
lanpacommented, Aug 23, 2017

I think it’s the same case as mentioned in #17, and pip install tensorboardX should solve the problem.

3reactions
lanpacommented, Mar 26, 2019

@YangSN0719 It should be from tensorboardX, not tensorboard.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ImportError: cannot import name 'SummaryWriter'
The reason is that I named the file 'tensorboard.py',so rename the python file to ensure that it does not duplicate the system name....
Read more >
cannot import name 'SummaryWriter' from 'tensorboard ...
I cannot run my code with tensorboard because of this error. ... ImportError: cannot import name 'SummaryWriter' from 'tensorboard'.
Read more >
ImportError: cannot import name 'SummaryWriter' from ...
ImportError : cannot import name 'SummaryWriter' from partially initialized module 'torch.utils.tensorboard' (most likely due to a circular ...
Read more >
ImportError: cannot import name 'SummaryWriter' from ...
ImportError : cannot import name 'SummaryWriter' from partially initialized module 'torch.utils.tensorboard'. 解决方法:出现这个的原因是因为 ...
Read more >
ImportError: cannot import name 'SummaryWriter' from ...
ImportError : cannot import name 'SummaryWriter' from partially initialized module 'torch.utils.tensorboard',解决方法:出现这个的原因是因为 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found