Jetson nano install torch error OSError: cannot open shared object file: No such file or directory

I’m trying to build yolov5/v7 on jetson nano as a ros node.I have cuda version 10.0,as I learned from the internet, I can use upto torch 1.10.0. However,I tried torch 1.6,1.8 and 1.10,all of which lead to the following error when I try to import them

bcsh@bcsh-desktop:~$ python3
Python 3.6.9 (default, Mar 10 2023, 16:46:00) 
[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/bcsh/.local/lib/python3.6/site-packages/torch/", line 196, in <module>
  File "/home/bcsh/.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

while torch1.2 can be successfully installed and import , yolov5 and v7 need at least torch 1.7 to function.

So I wonder if it’s my cuda version too low,or some other things broken?
I have been spending days solving this problem.Thanks for any reply.


There are dependencies between the GPU driver and the CUDA package.

It’s recommended to upgrade your device to the latest JetPack 4.6.3 which contains CUDA 10.2.
The corresponding PyTorch package for this environment is v1.11:


1 Like

But I heard that if I upgrade jetpack,all the existing packages and dependencise will be influenced.I wonder if is right.For I already have a built ROS and many ros packages on the board.
So I want to make sure whether it would influence the whole system,or just things about CUDA,torch,and python


Yes, the dependencies will be influenced.
But CUDA 10.0 is released for a while, it will limit you to use some newer software.


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