Installing torch and torchvision on Orin Nano

I’ve got a Jetson Orin Nano Developer Kit 8GB with a fresh install of JetPack 6.2 (6.2+b77 to be exact) and I’m trying to install the Python packages torch and torchvision. I’d like the newest versions built for the Jetson platform by Nvidia.

When I try

pip3 install https://developer.download.nvidia.com/compute/redist/jp/v61/pytorch/torch-2.5.0a0+872d972e41.nv24.08.17622132-cp310-cp310-linux_aarch64.whl

it installs succesfully and runs as intended.

When I try to install torchvision using

pip install http://jetson.webredirect.org/jp6/cu126/+f/5f9/67f920de3953f/torchvision-0.20.0-cp310-cp310-linux_aarch64.whl#sha256=5f967f920de3953f2a39d95154b1feffd5ccc06b4589e51540dc070021a9adb9

it installs properly but then I try to import torchvision, I get an error:

import torchvision
Traceback (most recent call last):
File “”, line 1, in
File “/home/kirk/torchvision/torchvision/init.py”, line 10, in
from torchvision import _meta_registrations, datasets, io, models, ops, transforms, utils # usort:skip
File “/home/kirk/torchvision/torchvision/_meta_registrations.py”, line 164, in
def meta_nms(dets, scores, iou_threshold):
File “/home/kirk/trt-venv/lib/python3.10/site-packages/torch/library.py”, line 720, in register
use_lib._register_fake(op_name, func, _stacklevel=stacklevel + 1)
File “/home/kirk/trt-venv/lib/python3.10/site-packages/torch/library.py”, line 180, in _register_fake
handle = entry.fake_impl.register(func_to_register, source)
File “/home/kirk/trt-venv/lib/python3.10/site-packages/torch/_library/fake_impl.py”, line 31, in register
if torch._C._dispatch_has_kernel_for_dispatch_key(self.qualname, “Meta”):
RuntimeError: operator torchvision::nms does not exist

I’ve had a hard time understanding the nvidia documentation regarding the installation and version compatibility of the different torch & torchvision packages with the different JetPack versions.

Any help in getting the most modern versions of torch and torchvision installed would be great, thanks!

Hi,

Please download those prebuilt wheels

wget https://pypi.jetson-ai-lab.dev/jp6/cu126/+f/6ef/f643c0a7acda9/torch-2.7.0-cp310-cp310-linux_aarch64.whl#sha256=6eff643c0a7acda92734cc798338f733ff35c7df1a4434576f5ff7c66fc97319
wget https://pypi.jetson-ai-lab.dev/jp6/cu126/+f/daa/bff3a07259968/torchvision-0.22.0-cp310-cp310-linux_aarch64.whl#sha256=daabff3a0725996886b92e4b5dd143f5750ef4b181b5c7d01371a9185e8f0402

Thanks

1 Like