2

I installed pytorch using pip3 command for my windows pc without GPU support. But when I tried to import torch it is giving an error.

At first, there was a different error saying numpy version not matching and I updated the numpy to the latest version.

import torch
RuntimeError                              Traceback (most recent call last)
<ipython-input-10-c031d3dd82fc> in <module>()
----> 1 import torch

C:\Users\iamuraptha\Anaconda3\lib\site-packages\torch\__init__.py in <module>()
     82     pass
     83 
---> 84 from torch._C import *
     85 
     86 __all__ += [name for name in dir(_C)

RuntimeError: generic_type: cannot initialize type "TensorProtoDataType": an object with that name is already defined

2 Answers 2

1

I reinstalled anaconda and then created a virtual environment for pytorch.Now everything works fine

Sign up to request clarification or add additional context in comments.

2 Comments

What if this error append on a google colab environment ?
I got the same error in colab
1

If you are running this in colab, remember to restart your runtime after installing your modules with pip.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.