nameerror: name ‘_c’ is not defined

There are many situations in which you may encounter this error when doing the import torch. Try following workarounds and see if any works for you:

  1. If you got this error when using Google Colab, try resetting the runtime.
  2. You can try to install Cython using pip3 install Cython and see if it helps in your situation.
  3. The error may also occur because you were in the wrong folder when doing the import. Change directory before calling import torch
cd test
python
>>> import torch

More Articles

gulpInst is undefined

This error may happen when we try switching gulp-li versions around and got things messed up along t...

codezilla

codezilla

module ‘matplotlib.pyplot’ has no attribute ‘hold’

You may encounter this problem when using or updating to matplotlib 3.0+ because the function hold w...

codezilla

codezilla

reanimated 2 failed to create a worklet maybe you forgot to add reanimated babel plugin

This error is likely because you put ‘react-native-reanimated/plugin’ in babel.config.js...

codezilla

codezilla