Problem with PyTorch on AGX Xavier (no

I want to use yolov5 on AGX Xavier, but encountered a problem with PyTorch (no What can I do to fix it without reflashing Jetson (I only have ssh to it, but no physical access)?

When try to import torch (installed torch-1.10.0-cp36-cp36m-linux_aarch64.whl), there is this error:

jetson@jetson:~/Desktop$ python3
Python 3.6.9 (default, Jun 29 2022, 11:45:57)
[GCC 8.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/jetson/.local/lib/python3.6/site-packages/torch/", line 196, in <module>
  File "/home/jetson/.local/lib/python3.6/site-packages/torch/", line 149, in _load_global_deps
    ctypes.CDLL(lib_path, mode=ctypes.RTLD_GLOBAL)
  File "/usr/lib/python3.6/ctypes/", line 348, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: cannot open shared object file: No such file or directory

So is not found. And that’s true. It’s not existent in cuda-10.2 directory:

jetson@jetson:/usr/local/cuda-10.2/lib64$ ls
libcudadevrt.a            libnppitc_static.a               libnppicc_static.a             libnppif_static.a            libnppist_static.a
libcudart_static.a     libnppc_static.a            libnpps_static.a            libnppicom_static.a            libnppig_static.a            libnppisu_static.a
libculibos.a           libnppial_static.a                libnppidei_static.a              libnppim_static.a  stubs

I have JetPack 4.4 installed.

jetson@jetson:~$ cat /etc/nv_tegra_release
# R32 (release), REVISION: 4.4, GCID: 23942405, BOARD: t186ref, EABI: aarch64, DATE: Fri Oct 16 19:37:08 UTC 2020
jetson@jetson:~$ sudo apt-cache show nvidia-jetpack
Package: nvidia-jetpack
Version: 4.4.1-b50
Architecture: arm64
Maintainer: NVIDIA Corporation
Installed-Size: 194
Depends: nvidia-cuda (= 4.4.1-b50), nvidia-opencv (= 4.4.1-b50), nvidia-cudnn8 (= 4.4.1-b50), nvidia-tensorrt (= 4.4.1-b50), nvidia-visionworks (= 4.4.1-b50), nvidia-container (= 4.4.1-b50), nvidia-vpi (= 4.4.1-b50), nvidia-l4t-jetson-multimedia-api (>> 32.4-0), nvidia-l4t-jetson-multimedia-api (<< 32.5-0)
Priority: standard
Section: metapackages
Filename: pool/main/n/nvidia-jetpack/nvidia-jetpack_4.4.1-b50_arm64.deb

Also there is no libcurand-10-2 (or any other libcurand) when checking apt (with and without sudo)

jetson@jetson:~$ sudo apt list --installed | grep libcurand-10-2

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.


Solution was installing a cuda toolkit:

sudo apt-get install cuda-toolkit-10-2

Then got another problem while importing torch or numpy in python (Illegal instruction (core dumped))
That was solved by:


Hope that it will be useful

Thanks for the sharing!

1 Like

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