ImportError:failed to load Pytorch C extensions:It appears that Pytorch has loaded the 'torch/_C' folder of the Pytorch repository rather than the C extensions which are expected in the 'torch._C' namespace.

I am using Jetson agx xavier from nvida.
jetpack4.4 ubuntu18.04 CUDA 10.02.
Now i want to download torch into this ARM, here is how Nvida tells me to do.


But my internet can not do the first step ,i can not wget https://nvida.box.com.
So i download it by chrom, then pip install and import it into pycharm.
Then i see this error, it has bother me for a half month.

ImportError:failed to load Pytorch C extensions:It appears that Pytorch has loaded the ‘torch/_C’ folder of the Pytorch repository rather than the C extensions which are expected in the ‘torch._C’ namespace.This can occur when using the ‘install’ workflow.
$ pthon setup.py install && python -c “import torch”
This error can generally be solved using the ‘develop’ work flow
$ python setup.py develop &&python -c “import torch” #This should succeed or by running Python from a different directory.

I find this error from the init.file:


My anaconda is python3.7, then i see this and change it to python3.6. And then i see this error:

The both error bothered me for a long time, i really hope someone to save me. :sob: :sob: :sob:

1 Like

hello, I meet the same question,and i want to ask do you slove this bug?

I realized for me it was because I ran commands from a directory which had a folder named torch. It worked fine from other directories.