Issues finding compatible torchvision with JetPack 5.1.2

Hi everyone,

I’m trying to run YOLOv8 on my Jetson Orin NX with JetPack 5.1.2 and Python 3.8. After extensive searching, I installed torch 2.1.0a0+41361538.nv23.06, which is the compatible version for JetPack. However, when I attempted to run a script using YOLO, I encountered issues with the version of torchvision.

Through my research, I found that the appropriate version for torchvision is 0.16.0. I installed it using the following commands:

git clone --branch v0.16.0 https://github.com/pytorch/vision torchvision
cd torchvision
export BUILD_VERSION=0.16.0
python3 setup.py install

The installation completed successfully, but when I try to execute a file that uses YOLO, I get the following warning:

UserWarning: Failed to load image Python extension: '/home/laura/deteccion_piezas/lib/python3.8/site-packages/torchvision/image.so: undefined symbol: _ZN5torch3jit17parseSchemaOrNameERKSs' 
If you don't plan on using image functionality from `torchvision.io`, you can ignore this warning. Otherwise, there might be something wrong with your environment. Did you have `libjpeg` or `libpng` installed before building `torchvision` from source?
warn(

Additionally, I receive a traceback error:

RuntimeError: Couldn't load custom C++ ops. This can happen if your PyTorch and torchvision versions are incompatible, or if you had errors while compiling torchvision from source. For further information on the compatible versions, check https://github.com/pytorch/vision#installation for the compatibility matrix. Please check your PyTorch version with torch.__version__ and your torchvision version with torchvision.__version__ and verify if they are compatible, and if not please reinstall torchvision so that it matches your PyTorch install.

I would appreciate any guidance on how to resolve these compatibility issues between PyTorch and torchvision. Thank you!

Hi,

Suppose PyTorvh 2.1 should work with TorchVision 0.16.1.

Are you able to share the command you test to reproduce the error?
If so, we can also give it a try.

Thanks.

I uninstalled and installed TorchVision 0.16.1 from source and that resolved the issue!

Thank you so much for the help!

1 Like

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