Pytorch import error

RuntimeError Traceback (most recent call last)
in ()
1 import numpy as np
----> 2 import torch

/usr/local/lib/python3.6/dist-packages/torch/init.py in ()
188 if USE_GLOBAL_DEPS:
189 _load_global_deps()
–> 190 from torch._C import *
191
192 # Appease the type checker; ordinarily this binding is inserted by the

RuntimeError: generic_type: cannot initialize type “TensorProtoDataType”: an object with that name is already defined.
This error appears when i run import torch

1 Like

Try making a virtual environment and then installing pytorch in it. If you have pytorch installed globally then it won’t consume data. Try importing after that. If that doesn’t work maybe reinstalling Anaconda would work. Do you get this error on binder or locally?