How to get Pytorch to work on jetson Orin Nano

This may be the same as the title below…
JetPack 6.2 Brings Super Mode to NVIDIA Jetson Orin Nano and Jetson Orin NX
But I don’t use Super Mode so I created a new topic.

JetPack 6.2 Brings Super Mode to NVIDIA Jetson Orin Nano and Jetson Orin NX

I had installed JetPack 6.2 on Jetson Orin Nano.
I tried to install PyTroch for Jetson but the PyTorch did not run on Jetson Orin nano.
I had installed JetPack 6.2 on Jetson Orin Nano.
How do I properly install PyTorch to run on the GPU?

JetPack 6.2
R36 (release), REVISION: 4.3, GCID: 38968081, BOARD: generic, EABI: aarch64, DATE: Wed Jan 8 01:49:37 UTC 2025

KERNEL_VARIANT: oot

TARGET_USERSPACE_LIB_DIR=nvidia
TARGET_USERSPACE_LIB_DIR_PATH=usr/lib/aarch64-linux-gnu/nvidia

cuda 12.6
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2024 NVIDIA Corporation
Built on Wed_Aug_14_10:14:07_PDT_2024
Cuda compilation tools, release 12.6, V12.6.68
Build cuda_12.6.r12.6/compiler.34714021_0

  1. I downloaded and installed it from the following page, but an error occurs when I run it.
    https://developer.download.nvidia.com/compute/redist/jp/v60/pytorch/
    torch-2.4.0a0+07cecf4168.nv24.05.14710581-cp310-cp310-linux_aarch64.whl
    torch-2.4.0a0+3bcc3cddb5.nv24.07.16234504-cp310-cp310-linux_aarch64.whl
    torch-2.4.0a0+f70bd71a48.nv24.06.15634931-cp310-cp310-linux_aarch64.whl
    Successfully installed torch-2.4.0a0+07cecf4168.nv24.5
    (myenv) jetson@ubuntu:~/sensor$ python3
    Python 3.10.12 (main, Jan 17 2025, 14:35:34) [GCC 11.4.0] on linux
    Type “help”, “copyright”, “credits” or “license” for more information.
    >>> import torch
    Traceback (most recent call last):
    File “”, line 1, in
    File “/home/jetson/sensor/myenv/lib/python3.10/site-packages/torch/init.py”, line 237, in
    from torch._C import * # noqa: F403
    ImportError: /usr/lib/aarch64-linux-gnu/libcudnn.so.8: version `libcudnn.so.8’ not found (required by /home/jetson/sensor/myenv/lib/python3.10/site-packages/torch/lib/libtorch_python.so)

  2. I thought about using Docker container, but it doesn’t seem to work with JetPack12.6.
    NVIDIA L4T PyTorch | NVIDIA NGC
    JetPack 5.1 (L4T R35.2.1)
    JetPack 5.0.2 (L4T R35.1.0)
    JetPack 5.0.1 Developer Preview (L4T R34.1.1)
    JetPack 5.0.0 Developer Preview (L4T R34.1.0)
    JetPack 4.6.1 (L4T R32.7.1)
    JetPack 4.6 (L4T R32.6.1)
    JetPack 4.5 (L4T R32.5.0)
    JetPack 4.4.1 (L4T R32.4.4)
    JetPack 4.4 (L4T R32.4.3)
    JetPack 4.4 Developer Preview (L4T R32.4.2)

  3. There seems to be a way to build PyTorch from source code on Jetson Orin Nano.
    I tried it, however an error occurred during the build…

Hello @mori1075

Could you please try installing the package from https://pypi.jetson-ai-lab.dev/jp6/cu126?

I hope this helps!

Regards!
Eduardo Salazar
Embedded SW Engineer at RidgeRun

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

When I used the PyTorch library below, my code using the Pytrch API worked correctly on the GPU on Jetson Orin Nano.
https://pypi.jetson-ai-lab.dev/jp6/cu126/torch/2.6.0rc1
Thank you very much for your support!

Hi,

Yes, we have moved the packages for JetPack 6.2 to the below link:

https://pypi.jetson-ai-lab.dev/jp6/cu126

For the container, L4T-based images have been merged into the PyTorch release. (not L4T PyTorch anymore)
Please find the image with igpu tag for Jetson. Ex. nvcr.io/nvidia/pytorch:25.01-py3-igpu.

Thanks.

Hello @mori1075

So, does that mean that your issue was solved correctly?

Regards!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.