Cannot install PyTorch on jetson nano

I installed the Jetson Nano Developer Kit SD Card Image from the Getting Started guide and there doesn’t seem to be a compatible version of PyTorch for that card image.
I tried torch-1.4.0-cp36-cp36m-linux_aarch64.whl which installs fine but gives the error ImportError: libcudart.so.10.0 when I try to import it. The version of cuda on the card image is 10.2. I tried version 1.6 of torch but it is not supported on the current platform. Please advise as to how I can proceed. Thank you.

The PyTorch 1.6 wheel is for JetPack 4.4 production release (L4T R32.4.3), so that should work with the current SD card image. It needs installed with python3 though (pip3), not python2 (pip).

If you continue having problems installing, you could use the l4t-pytorch container, which has torch and torchvision pre-installed.

So I used the the Jetson Nano Developer Kit SD Card Image from the Getting Started guide. Is that not the JetPack 4.4 production release? When I try to install the PyTorch 1.6 wheel using
sudo pip3 install torch-1.6.0-cp36-cp36m-linux-aarch64.whl
I get
torch-1.6.0-cp36-cp36m-linux-aarch64.whl is not a supported wheel on this platform.

1 Like

Yes, it is. To make sure, can you try running cat /etc/nv_tegra/release?

$ cat /etc/nv_tegra_release
# R32 (release), REVISION: 4.3,

It should be L4T R32.4.3.

Typically that is the message you get when you try to install a Python 3.6 wheel on Python 2.7 (or vice versa). Or if the wheel is corrupt - have you tried re-downloading it from this link:

https://nvidia.box.com/shared/static/9eptse6jyly1ggt9axbja2yrmj6pbarc.whl

Does the l4t-pytorch container run for you?

So this is now working from the download link that you provided. I’m running the jetson in headless mode so I copy and pasted the wget command from the PyTorch page and mismatched the version. That was a silly mistake. Thank you very much for your assistance.

No worries, glad you got it working @mjwhite2529!