Hello,
I need to install torch and torchvision for a python project on my Jetson AGX Orin.
I installed pytorch following this tutorial Installing PyTorch for Jetson Platform - NVIDIA Docs
I picked the wheel torch-2.0.0a0+8aa34602.nv23.03-cp38-cp38-linux_aarch64.whl
It works well, torch.cuda.is_available returns True and i can use torch tensors.
Then to install torchvision, it doesn’t work with pip (incompatible version) and it is required to build it, as pointed out by multiple topics in here.
I followed this tutorial PyTorch for Jetson
Building the torchvision 0.15.1 to be compatible with my version.
(i installed the required libraries mentioned in the tutorial before building.)
import torchvision is successful and print(torchvision.version) returns 0.15.1.
Still, when i run my script i’ve got :
-A warning :
“UserWarning: Failed to load image Python extension: ''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(”
-An 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 GitHub - pytorch/vision: Datasets, Transforms and Models specific to Computer Vision 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 tried following this PyTorch and torchvision versions are incompatible using an older version (torch 1.11.0, torchvision 0.12.0a0+9b5a3fe), and i’ve got the same error, but a different warning :
“UserWarning: Failed to load image Python extension:
warn(f"Failed to load image Python extension: {e}”)"
I tried using the unreleased wheel torch-2.0.0+nv23.05-cp38-cp38-linux_aarch64.whl that was suggested on a different topic, and i’ve got the same error, even after rebuilding torchvision 0.15.1.
(Also, i had to follow this What is the compatible torchvision version for torch-1.14.0a0+44dac51c.nv23.2 installed on AGX ORIN( Ubuntu-22.04, JP-5.1/5.0, Python-3.8, CUDA-11.4) - #14 by fpsychosis, modifying cpp_extension to be able to build torchvision otherwise i had errors during compiling.)
I know there’s a Docker container which should work but i don’t know what is wrong with my current configuration.
Thank you.