Importing torch error

Hi
On importing torch, I’m getting the following error. Can anyone help with this?

File “”, line 14, in
import torch

File “C:\Users\SALOME\Anaconda3\lib\site-packages\torch_init_.py”, line 83, in
all += [name for name in dir(_C)

NameError: name ‘_C’ is not defined

How did you install PyTorch? Using Conda?

I installed pytorch using conda
but since this error threw up
I kind of reinstalled it as shown in the figure but the error persisted

(base) C:\Users\SALOME>python
Python 3.7.1 (default, Dec 10 2018, 22:54:23) [MSC v.1915 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type “help”, “copyright”, “credits” or “license” for more information.
import torch
goes to next line

it runs fine on using the anaconda prompt but throws an error when i import it in Spyder

import torch
Traceback (most recent call last):

File “”, line 1, in
import torch

File “C:\Users\SALOME\Anaconda3\lib\site-packages\torch_init_.py”, line 81, in
all += [name for name in dir(_C)

NameError: name ‘_C’ is not defined

this is the error i get on spyder

it points to line 81 in the error in init.py

Double post from here.