Hello, I am currently trying to set up PyTorch and Torchvision on my Jetson Orin Nano.
Using JP 6.1
I followed the instructions from π
Initial Setup Guide - Jetson Orin Nano - NVIDIA Jetson AI Lab and were able to install pytorch 2.5 with cuda support (from here: developer.download.nvidia.com/compute/redist/jp/v61/pytorch/ ). Unfortunately, i am not able to install the matching torchvision version.
Tried using JetPack 6.0
Then i tried the same using jetpack 6 image from here: JetPack SDK 6.0 | NVIDIA Developer
Installed torchvision as well as built it from source but ran into the same error as with jetpack 6.1.
Error message when importing torchvision:
RuntimeError: operator torchvision::nms does not exist
I would appreciate any help with this, thank you.
I wouldnβt mind if you enable me to use JP 6.0 or 6.1. Important would be to not use a container or venv.
1 Like
Hi,
You can find PyTorch and TorchVision for JetPack 6.1 below:
http://jetson.webredirect.org/jp6/cu126
Thanks.
Hi thereβs still version incompatibility between the torch and torch vision downloaded from the above link for jetpack 6.1 rev 1. If I try to import torchvision after installing both wheels, I get a operator torchvision :: nms does not exist
1 Like
Hi,
Thanks, it looks like there are some issues with PyTorch 2.6.0rc1 and TorchVision 0.20.0.
Please use the PyTorch 2.5.0 and TorchVision 0.19.1 instead (compatible to JetPack 6.1):
$ wget https://pypi.jetson-ai-lab.dev/jp6/cu126/+f/5cf/9ed17e35cb752/torch-2.5.0-cp310-cp310-linux_aarch64.whl#sha256=5cf9ed17e35cb7523812aeda9e7d6353c437048c5a6df1dc6617650333049092 -O torch-2.5.0-cp310-cp310-linux_aarch64.whl
$ pip3 install torch-2.5.0-cp310-cp310-linux_aarch64.whl
$ wget https://pypi.jetson-ai-lab.dev/jp6/cu126/+f/9d2/6fac77a4e832a/torchvision-0.19.1a0+6194369-cp310-cp310-linux_aarch64.whl#sha256=9d26fac77a4e832a3a2a547543aabc6256b6f94b6531f6a94a762989db4535f8 -O torchvision-0.19.1a0+6194369-cp310-cp310-linux_aarch64.whl
$ pip3 install torchvision-0.19.1a0+6194369-cp310-cp310-linux_aarch64.whl
We can import both PyTorch and TorchVision without issues:
$ python3
Python 3.10.12 (main, Sep 11 2024, 15:47:36) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> import torchvision
>>> torch.__version__
'2.5.0'
>>> torchvision.__version__
'0.19.1a0+6194369'
>>>
Thanks.
3 Likes
We got it setup with torch 2.6.0rc1 and Torchvision 0.20.0 by following these steps:
Flash JP6.1 rev1 Image from here:
π Initial Setup Guide - NVIDIA Jetson AI Lab
Install Cuda Keyring and libcusparselt
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/arm64/cuda-keyring_1.1-1_all.deb
sudo dpkg -i cuda-keyring_1.1-1_all.deb
sudo apt-get update
sudo apt-get -y install libcusparselt0 libcusparselt-dev
Install python3.10-venv and python3-pip
sudo apt install python3.10-venv
sudo apt install python3-pip
Install pytorch, torchvision and torchaudio for jp61
pip install torch torchvision torchaudio --index-url http://108.39.248.12:81/jp6/cu126/+simple/ --trusted-host 108.39.248.12
Verify PyTorch and TorchVision installation:
python3 / python
import torch
torch.__version__
>>> '2.5.0'
torch.cuda.is_available()
>>> True
torch.cuda.device_count()
>>> 1
torch.cuda.current_device()
>>> 0
torch.cuda.device(0)
>>> <torch.cuda.device at 0x7efce0b03be0>
torch.cuda.get_device_name(0)
>>> 'Orin'
import torchvision
torchvision.__version__
>>> '0.20.0'
Hi,
Good to know it works now.
Could you also share how you prepare the torch, torchvision, and torchaudio packages on @108.39.248.12 ?
Do you download them from the jp6/cu126 index ?
Thanks.
system
Closed
January 29, 2025, 5:53am
9
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.