Tensorboard in pytorch 1.1

I update my pytorch to 1.1 by conda. But I found the tensorboard module is not in the pytorch. It says ‘ImportError: TensorBoard logging requires TensorBoard with Python summary writer installed. This should be available in 1.14 or above.’
The 1.14 means the version of pytorch, tensorflow or just tensorboard? I use pip install tb-nightly as the docs say, but I get another error
File “C:\Users\dayek.conda\envs\pytorchgpu\lib\site-packages\torch\utils\tensorboard_init_.py”, line 6, in
from .writer import FileWriter, SummaryWriter # noqa F401
File “C:\Users\dayek.conda\envs\pytorchgpu\lib\site-packages\torch\utils\tensorboard\writer.py”, line 18, in
from ._convert_np import make_np
File “C:\Users\dayek.conda\envs\pytorchgpu\lib\site-packages\torch\utils\tensorboard_convert_np.py”, line 12, in
from caffe2.python import workspace
File “C:\Users\dayek.conda\envs\pytorchgpu\lib\site-packages\caffe2\python\workspace.py”, line 15, in
from past.builtins import basestring
ModuleNotFoundError: No module named ‘past’
How can I solve this? Thx.

1 Like

You would have to install future using:

pip install future
5 Likes

@ptrblck I’m getting the same error even though I’ve got tb-nightly version 1.15 install along with future
The error I’m getting:
ImportError: TensorBoard logging requires TensorBoard with Python summary writer installed. This should be available in 1.14 or above.

Have a look at this post. Could you try to check for multiple tensorboard installations?

I have checked for multiple installations but that’s not the problem as there’s only one installed package that is tb-nightly version 1.15. And the problem seems quite strange as while I was checking the error today from command line the statement from torch.utils.tensorboard import SummaryWriter ran without any errors in the interpreter but on running the code file using python filename.py threw the same error. I couldn’t understand what’s happening so again tried using the interpreter and now, it too throws the same error. I don’t know why this is happening or why it worked for the first time.

1.14 might refer to the version of tensorboard
if you also have the error like “No module named tensorboard”, just install it via
conda install tensorboard

1 Like