I have been trying to install Pytorch on Jetson TX2 by following this guide https://github.com/andrewadare/jetson-tx2-pytorch. However after building Pytorch from source when I try to import it I get the error:
>>> import torch
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'torch'
>>>
and if I change directory to where pytorch is installed and then try to open it I get this error
(general) nvidia@tegra-ubuntu:~$ cd pytorch/
(general) nvidia@tegra-ubuntu:~/pytorch$ python3
Python 3.6.0 (default, Jan 31 2018, 10:50:05)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/nvidia/pytorch/torch/__init__.py", line 56, in <module>
from torch._C import *
ModuleNotFoundError: No module named 'torch._C'
>>>
Can anyone please help me?
Edit: it seems to be working if I start python interpreter inside a folder inside build directory. (~/pytorch/build/lib.linux-aarch64-3.6)