Python not working in jetson nano

brunelautonomousracing@brunelautonomousracing-desktop:~/yolov7-gpu$ python3 --weights runs/train/yolov7-cones/weights/ --source 1
Traceback (most recent call last):
File “”, line 6, in
import torch
File “/home/brunelautonomousracing/.local/lib/python3.6/site-packages/torch/”, line 195, in
File “/home/brunelautonomousracing/.local/lib/python3.6/site-packages/torch/”, line 148, 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

how to solve it?

Hi @naikrohanp97, which version of JetPack-L4T are you running (you can check this with cat /etc/nv_tegra_release) and which PyTorch wheel did you install? You would need to install a PyTorch wheel from here which is compatible with your version of JetPack.

Also, can you check that you have CUDA Toolkit installed?

ls /usr/local/cuda/lib64/             libcufft_static.a             libcurand_static.a            libcufft_static_nocallback.a     libnvgraph_static.a                  libnppial_static.a        libnppif_static.a        libnppisu_static.a
libcublasLt_static.a                            libcusolver_static.a              libcufftw_static.a                      libnppicc_static.a        libnppig_static.a        libnppitc_static.a
libcudadevrt.a           libcusparse_static.a                  libculibos.a                  liblapack_static.a                   libmetis_static.a          libnppicom_static.a       libnppim_static.a        libnpps_static.a                    
libcudart_static.a                    stubs                  libnppc_static.a           libnppidei_static.a       libnppist_static.a             

brunelautonomousracing@brunelautonomousracing-desktop:~$ cat /etc/nv_tegra_release

R32 (release), REVISION: 6.1, GCID: 27863751, BOARD: t210ref, EABI: aarch64, DATE: Mon Jul 26 19:20:30 UTC 2021

Hi dusty,

Package: nvidia-jetpack
Version: 4.6-b199
Priority: standard
Section: metapackages
Maintainer: NVIDIA Corporation
Installed-Size: 199 kB

this is the version of jetpack installed

hi dusty, I installed same Pytorch wheel compatible with the version of jetpack but when i check CUDA installation through this line:
ls /usr/local/cuda/lib64/

it gives:
brunelautonomousracing@brunelautonomousracing-desktop:~$ ls /usr/local/cuda/lib64/
ls: cannot access ‘/usr/local/cuda/lib64/’: No such file or directory


OK, yea it looks like you need to install the CUDA Toolkit (and probably cuDNN) - can you try running this?

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

After flash we tried to jetson nano and this is the result