PyTorch and TorchVision for Jetpack 6.2

As the title, couldn’t find any working combination for JetPack 6.2.

Where can i find any?

Hello @GuyZoler

Did you try installing the packages at jp6/cu126 index?

Regards!
Eduardo Salazar
Embedded SW Engineer at RidgeRun

Contact us: support@ridgerun.com
Developers wiki: https://developer.ridgerun.com/
Website: www.ridgerun.com

I have the samee problem. For me using the wheels from that link works for pytorch but not for torch vision. Why is that?

Hello @leonelhesse

Could you please try RuntimeError: operator torchvision::nms does not exist - #5 by AastaLLL and check if it works?

Regards!

HI

I ended up getting it to run using
torch 2.5.0a0+872d972e41.nv24.8 from Nvidia https://developer.download.nvidia.com/compute/redist/jp/v61/pytorch/

for torchvision i got the git repo and built it and install to my venv:

run this when your venv active:
python setup.py install

Good luck

Importing them works but i do still get a nms error when trying to run something. When trying to build from source my jetson always crashes

Hi,

Please try the package in the below link:

We have upgraded the PyTorch version to v2.6.0. (previous was rc1)

Thanks.

It is still throwing error. I am using Jetson Orin AGX (64 dev kit) with Jetpack 6.2 and Ubuntu 22.04 and getting this error:

python3 -m pip install torch-2.6.0-cp310-cp310-linux_aarch64.whl
ERROR: torch-2.6.0-cp310-cp310-linux_aarch64.whl is not a supported wheel on this platform.

Hi,

Could you check the below command.
We have verified that it can work on JetPack 6.2.

Thanks.

I am having this same issue, also on Jetpack 6.2, even after running the commands you have provided.

Specifically, when trying to install the wheel after fetching it with wget, I get the following error:

ERROR: torch-2.6.0-cp310-cp310-linux_aarch64.whl is not a supported wheel on this platform.

To clarify, I have a Jetson Orin Nano with Ubuntu 22.04. I have not been able to install any Torch version that will detect the GPU (so basically, unable to successfully install ANY Torch wheels provided by NVIDIA). I can get regular Torch but that doesn’t detect the GPU for obvious reasons.

Hi,

Which Python version do you use?
Please note that the above package is built for Python 3.10.

Thanks.

Hello I am using Python 3.10, Jetpack 6.2, and Ubuntu 22.04 for a Jetson Orin Nano as well. I am able to install pytorch using your above commands, but it does not install the GPU compatible version for me either. Are there any wheels that are forward compatible with the new Jetpack so i can make use of the iGPU?

Hi, @araman3

Could you share the detailed command you run and the output of below command so we can know more about your environment?

$ python3 
Python 3.10.12 (main, Nov  6 2024, 20:22:13) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> import torchvision
>>> import torchaudio
>>> torch.__version__
'2.6.0'
>>> torchvision.__version__
'0.21.0'
>>> torchaudio.__version__
'2.6.0'

Thanks.

I copied and pasted the command you provided into my terminal:

pip3 install ‘numpy<2’
$ wget https://pypi.jetson-ai-lab.dev/jp6/cu126/+f/6cc/6ecfe8a5994fd/torch-2.6.0-cp310-cp310-linux_aarch64.whl#sha256=6cc6ecfe8a5994fd6d58fb6d6eb73ff2437428bb4953f3ebaa409f83a5f4db99
$ wget https://pypi.jetson-ai-lab.dev/jp6/cu126/+f/aa2/2da8dcf4c4c8d/torchvision-0.21.0-cp310-cp310-linux_aarch64.whl#sha256=aa22da8dcf4c4c8dc897e7922b1ef25cb0fe350e1a358168be87a854ad114531
$ wget https://pypi.jetson-ai-lab.dev/jp6/cu126/+f/dda/ce98dc7d89263/torchaudio-2.6.0-cp310-cp310-linux_aarch64.whl#sha256=ddace98dc7d892634d2e5b08593436f3e3b1247a1cb11c0d5f4e5ccf64a9be8c
$ pip3 install --force torch-2.6.0-cp310-cp310-linux_aarch64.whl
$ pip3 install --force torchvision-0.21.0-cp310-cp310-linux_aarch64.whl
$ pip3 install --force torchaudio-2.6.0-cp310-cp310-linux_aarch64.whl

It does not fail, but it installs a version of torch that only utilizes CPU, with output attached according to the commands you requested. Torchvision and torchaudio have errors, even though numpy is confirmed to be <2:

import torch
torch.version

‘2.6.0+cpu’

import torchvision

RuntimeError: operator torchvision::nms does not exist

import torchaudio

OSError: libtorch_cuda.so: cannot open shared object file: No such file or directory

When i try to download/install the following wheel for torch that utilizes Jetpack 6.1, it is compatible with 6.2, at least based on the functions you asked for, and seems to utilize the GPU:

import torch
torch.version

‘2.5.0a0+872d972e41.nv24.08’

Also to clarify, I have CUDA 12.6 version

2 Likes

I had exactly the same issue with @araman3 about Jetpack 6.2 on Jetson Orin DevKit. Please check this issue.

Hi, both

In case the pip tool installs the package from the cache, could you try the command below:

$ pip3 install --force --no-cache-dir torch-2.6.0-cp310-cp310-linux_aarch64.whl

We have confirmed the package can work on JetPack 6.2.
Please note that the version should be 2.6.0 instead of 2.6.0+cpu.

$ python3 
Python 3.10.12 (main, Nov  6 2024, 20:22:13) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> torch.__version__
'2.6.0'
>>> torch.cuda.is_available()
True

Thanks.

Installing Python 3.10 (instead of 3.12, which I was using before) and installing the torch wheels using the command above worked. I am now able to run Torch using the GPU.

Thank you for the help!

Hi,
I figured out that the issue is due to torchvision. Torch installs fine, but when I try to install torchvision later, it reverts torch to a ‘+cpu’ version for some reason. I can install torch-2.6.0 but when I install torchvision, problems arise.

when I try to import torchvision in a python environment, I get the following error:
RuntimeError: operator torchvision::nms does not exist

This error comes after using your instructions in this post. I saw another post having the same issue with Jetpack 6.1, but I have Jetpack 6.2 and I dont know which version of torchvision would be compatible with this torch-2.6.0 wheel you created.

2 Likes

This is the exact same issue I have, torch itself works with cuda, but once torchvision is installed, torch reverts to cpu

1 Like

My Jetson AGX Orin (Jetpack 6.2) had the same issue, it is solved by install torch-2.7.0-cp310-cp310-linux_aarch64.whl and torchvision-0.22.0-cp310-cp310-linux_aarch64.whl from the link below.
jp6/cu126 index

1 Like