[Orin AGX] pytorch install problem

Hello. actually. I saw the a lot of pytorch and jetpack issues, and even I saw very recent issue.

this issue is very similar to me.

I installed pytorch through devpi and legacy wheel in GitHub - davidl-nv/torch, but I feel both are not quite different. these eventually encoutered same error.

also, I installed nccl but it is not help my problem.

first of all below cmd doing well but occure β€œimport torch” error

pip install --no-cache-dir torch-2.8.0-cp310-cp310-linux_aarch64.whl

(test_nccl) katech@ubuntu:~/Downloads$ pip install --no-cache-dir torch-2.8.0-cp310-cp310-linux_aarch64.whl 
Processing ./torch-2.8.0-cp310-cp310-linux_aarch64.whl
Collecting networkx>=2.5.1
  Downloading networkx-3.4.2-py3-none-any.whl (1.7 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.7/1.7 MB 6.9 MB/s eta 0:00:00
Collecting sympy>=1.13.3
  Downloading sympy-1.14.0-py3-none-any.whl (6.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.3/6.3 MB 6.4 MB/s eta 0:00:00
Collecting typing-extensions>=4.10.0
  Downloading typing_extensions-4.15.0-py3-none-any.whl (44 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 44.6/44.6 KB 13.8 MB/s eta 0:00:00
Collecting jinja2
  Downloading jinja2-3.1.6-py3-none-any.whl (134 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 134.9/134.9 KB 5.4 MB/s eta 0:00:00
Collecting filelock
  Downloading filelock-3.19.1-py3-none-any.whl (15 kB)
Collecting fsspec>=0.8.5
  Downloading fsspec-2025.9.0-py3-none-any.whl (199 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 199.3/199.3 KB 7.0 MB/s eta 0:00:00
Collecting mpmath<1.4,>=1.1.0
  Downloading mpmath-1.3.0-py3-none-any.whl (536 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 536.2/536.2 KB 5.5 MB/s eta 0:00:00
Collecting MarkupSafe>=2.0
  Downloading MarkupSafe-3.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (21 kB)
Installing collected packages: mpmath, typing-extensions, sympy, networkx, MarkupSafe, fsspec, filelock, jinja2, torch
Successfully installed MarkupSafe-3.0.2 filelock-3.19.1 fsspec-2025.9.0 jinja2-3.1.6 mpmath-1.3.0 networkx-3.4.2 sympy-1.14.0 torch-2.8.0 typing-extensions-4.15.0
(test_nccl) katech@ubuntu:~/Downloads$ python
Python 3.10.12 (main, Aug 15 2025, 14:32:43) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/katech/Downloads/test_nccl/lib/python3.10/site-packages/torch/__init__.py", line 407, in <module>
    from torch._C import *  # noqa: F403
ImportError: libcusparseLt.so.0: cannot open shared object file: No such file or directory
>>> exit(1)
(test_nccl) katech@ubuntu:~/Downloads$ pip install --no-cache-dir torch-2.8.0-cp310-cp310-linux_aa^Ch64.whl 
(test_nccl) katech@ubuntu:~/Downloads$ pip install torchvision-0.23.0-cp310-cp310-linux_aarch64.whl 
Processing ./torchvision-0.23.0-cp310-cp310-linux_aarch64.whl
Collecting numpy
  Downloading numpy-2.2.6-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (14.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 14.3/14.3 MB 3.7 MB/s eta 0:00:00
Collecting pillow!=8.3.*,>=5.3.0
  Downloading pillow-11.3.0-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (6.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.0/6.0 MB 1.5 MB/s eta 0:00:00
Requirement already satisfied: torch in ./test_nccl/lib/python3.10/site-packages (from torchvision==0.23.0) (2.8.0)
Requirement already satisfied: fsspec>=0.8.5 in ./test_nccl/lib/python3.10/site-packages (from torch->torchvision==0.23.0) (2025.9.0)
Requirement already satisfied: networkx>=2.5.1 in ./test_nccl/lib/python3.10/site-packages (from torch->torchvision==0.23.0) (3.4.2)
Requirement already satisfied: filelock in ./test_nccl/lib/python3.10/site-packages (from torch->torchvision==0.23.0) (3.19.1)
Requirement already satisfied: typing-extensions>=4.10.0 in ./test_nccl/lib/python3.10/site-packages (from torch->torchvision==0.23.0) (4.15.0)
Requirement already satisfied: sympy>=1.13.3 in ./test_nccl/lib/python3.10/site-packages (from torch->torchvision==0.23.0) (1.14.0)
Requirement already satisfied: jinja2 in ./test_nccl/lib/python3.10/site-packages (from torch->torchvision==0.23.0) (3.1.6)
Requirement already satisfied: mpmath<1.4,>=1.1.0 in ./test_nccl/lib/python3.10/site-packages (from sympy>=1.13.3->torch->torchvision==0.23.0) (1.3.0)
Requirement already satisfied: MarkupSafe>=2.0 in ./test_nccl/lib/python3.10/site-packages (from jinja2->torch->torchvision==0.23.0) (3.0.2)
Installing collected packages: pillow, numpy, torchvision
Successfully installed numpy-2.2.6 pillow-11.3.0 torchvision-0.23.0
(test_nccl) katech@ubuntu:~/Downloads$ pythoon
bash: pythoon: command not found
(test_nccl) katech@ubuntu:~/Downloads$ python
Python 3.10.12 (main, Aug 15 2025, 14:32:43) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/katech/Downloads/test_nccl/lib/python3.10/site-packages/torch/__init__.py", line 407, in <module>
    from torch._C import *  # noqa: F403
ImportError: libcusparseLt.so.0: cannot open shared object file: No such file or directory
>>> exit()

but if install torchvision –force, it can make work import torch

pip install torchvision-0.23.0-cp310-cp310-linux_aarch64.whl --force-reinstall

(test_nccl) katech@ubuntu:~/Downloads$ pip install torchvision-0.23.0-cp310-cp310-linux_aarch64 --force-reinstall
ERROR: Could not find a version that satisfies the requirement torchvision-0.23.0-cp310-cp310-linux_aarch64 (from versions: none)
ERROR: No matching distribution found for torchvision-0.23.0-cp310-cp310-linux_aarch64
(test_nccl) katech@ubuntu:~/Downloads$ pip install torchvision-0.23.0-cp310-cp310-linux_aarch64.whl --force-reinstall
Processing ./torchvision-0.23.0-cp310-cp310-linux_aarch64.whl
Collecting numpy
  Using cached numpy-2.2.6-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (14.3 MB)
Collecting pillow!=8.3.*,>=5.3.0
  Using cached pillow-11.3.0-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (6.0 MB)
Collecting torch
  Downloading torch-2.8.0-cp310-cp310-manylinux_2_28_aarch64.whl (102.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 102.1/102.1 MB 4.5 MB/s eta 0:00:00
Collecting filelock
  Using cached filelock-3.19.1-py3-none-any.whl (15 kB)
Collecting fsspec
  Using cached fsspec-2025.9.0-py3-none-any.whl (199 kB)
Collecting typing-extensions>=4.10.0
  Using cached typing_extensions-4.15.0-py3-none-any.whl (44 kB)
Collecting networkx
  Using cached networkx-3.4.2-py3-none-any.whl (1.7 MB)
Collecting sympy>=1.13.3
  Using cached sympy-1.14.0-py3-none-any.whl (6.3 MB)
Collecting jinja2
  Using cached jinja2-3.1.6-py3-none-any.whl (134 kB)
Collecting mpmath<1.4,>=1.1.0
  Using cached mpmath-1.3.0-py3-none-any.whl (536 kB)
Collecting MarkupSafe>=2.0
  Using cached MarkupSafe-3.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (21 kB)
Installing collected packages: mpmath, typing-extensions, sympy, pillow, numpy, networkx, MarkupSafe, fsspec, filelock, jinja2, torch, torchvision
  Attempting uninstall: mpmath
    Found existing installation: mpmath 1.3.0
    Uninstalling mpmath-1.3.0:
      Successfully uninstalled mpmath-1.3.0
  Attempting uninstall: typing-extensions
    Found existing installation: typing_extensions 4.15.0
    Uninstalling typing_extensions-4.15.0:
      Successfully uninstalled typing_extensions-4.15.0
  Attempting uninstall: sympy
    Found existing installation: sympy 1.14.0
    Uninstalling sympy-1.14.0:
      Successfully uninstalled sympy-1.14.0
  Attempting uninstall: pillow
    Found existing installation: pillow 11.3.0
    Uninstalling pillow-11.3.0:
      Successfully uninstalled pillow-11.3.0
  Attempting uninstall: numpy
    Found existing installation: numpy 2.2.6
    Uninstalling numpy-2.2.6:
      Successfully uninstalled numpy-2.2.6
  Attempting uninstall: networkx
    Found existing installation: networkx 3.4.2
    Uninstalling networkx-3.4.2:
      Successfully uninstalled networkx-3.4.2
  Attempting uninstall: MarkupSafe
    Found existing installation: MarkupSafe 3.0.2
    Uninstalling MarkupSafe-3.0.2:
      Successfully uninstalled MarkupSafe-3.0.2
  Attempting uninstall: fsspec
    Found existing installation: fsspec 2025.9.0
    Uninstalling fsspec-2025.9.0:
      Successfully uninstalled fsspec-2025.9.0
  Attempting uninstall: filelock
    Found existing installation: filelock 3.19.1
    Uninstalling filelock-3.19.1:
      Successfully uninstalled filelock-3.19.1
  Attempting uninstall: jinja2
    Found existing installation: Jinja2 3.1.6
    Uninstalling Jinja2-3.1.6:
      Successfully uninstalled Jinja2-3.1.6
  Attempting uninstall: torch
    Found existing installation: torch 2.8.0
    Uninstalling torch-2.8.0:
      Successfully uninstalled torch-2.8.0
  Attempting uninstall: torchvision
    Found existing installation: torchvision 0.23.0
    Uninstalling torchvision-0.23.0:
      Successfully uninstalled torchvision-0.23.0
Successfully installed MarkupSafe-3.0.2 filelock-3.19.1 fsspec-2025.9.0 jinja2-3.1.6 mpmath-1.3.0 networkx-3.4.2 numpy-2.2.6 pillow-11.3.0 sympy-1.14.0 torch-2.8.0 torchvision-0.23.0 typing-extensions-4.15.0
(test_nccl) katech@ubuntu:~/Downloads$ python 
Python 3.10.12 (main, Aug 15 2025, 14:32:43) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> print(torch.cuda.nccl.version())
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/katech/Downloads/test_nccl/lib/python3.10/site-packages/torch/cuda/nccl.py", line 46, in version
    ver = torch._C._nccl_version()
AttributeError: module 'torch._C' has no attribute '_nccl_version'
>>> torch.__version__
'2.8.0+cpu'
>>> exit()

well anyway I can import pytorch but cannot using gpu.

I tested all of your pytorch wheel, both github legacy and pypi. but these work same.

why this error occured?

jtop and is below, Orin AGX.

can you try upgrading to jp 6.2? also pls install cusparseLt first and then install pytorch first. only after clearing pytorch issue u need to move with torchvision.

I tried at jetpack 6.2 all the solution before. I gave up so changed to 6.1.

for me it worked on jp 6.2.1. anyways i’ve seen that u were able to solve the issue in my previous topic. so maybe u can close the topic. :)

1 Like

Hi,

Based on your error, there are two different issues in your environment.

ImportError: libcusparseLt.so.0: cannot open shared object file: No such file or directory

Please install cuSPARSELt from the link below

The second error happens when you try to force install the torchvision.
It will reinstall the torch from upstream, which is not expected.

So please install the cuSPARSELt package and try to re-install the PyTorch packages from GitHub - davidl-nv/torch again.

Thanks.

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