ModuleNotFoundError: No module named 'past'
jjong2ya opened this issue · 5 comments
I am practicing pytorch and got an error as follows.
Traceback (most recent call last):
File "D:/Programing/tensorboardtest.py", line 1, in
from torch.utils.tensorboard import SummaryWriter
File "C:\Users\jjong\AppData\Roaming\Python\Python36\site-packages\torch\utils\tensorboard_init_.py", line 6, in
from .writer import FileWriter, SummaryWriter # noqa F401
File "C:\Users\jjong\AppData\Roaming\Python\Python36\site-packages\torch\utils\tensorboard\writer.py", line 18, in
from ._convert_np import make_np
File "C:\Users\jjong\AppData\Roaming\Python\Python36\site-packages\torch\utils\tensorboard_convert_np.py", line 12, in
from caffe2.python import workspace
File "C:\Users\jjong\AppData\Roaming\Python\Python36\site-packages\caffe2\python\workspace.py", line 15, in
from past.builtins import basestring
ModuleNotFoundError: No module named 'past'
Can any expert help me to solve?
This happens occasionally with particular versions of python (not sure about the details). Try running
pip install future
I did "pip install future" and it is installed, I guess.
Did it fix the problem?
No. It doesn't work.
In that case I recommend you install anaconda, and create a clean virtual environment to run the code. See the README.md for instructions on setting up such an environment when anaconda is installed.