Hi, I have followed the instruction here PyTorch for Jetson to install pytorch and torchvision.
PyTorch v2.1 - torchvision v0.16.1
Here is my AGX ORIN Spec:
Jetpack 5.1.2-b104
l4t 35.4.1
Ubuntu 20.04
CUDA 11.4
After I done the installation, I can import torch and cuda.available is True. GPU is detected as Orin. However, when I try to show the version of torchvision. It stated that module ‘torchvision’ has no attribute ‘version’.
Then when I perform the command “pip show torchvision” , it is stated that Torchvision not found. Here is the prove that torchvision v0.16.1 is installed.
Also, I tried another way which direct using “pip install torchvision==0.16.1” which turned out that the error of
UserWarning: Failed to load image Python extension: '/home/agx_orin/Documents/SP40/.venv/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(**
After that, Runtime error is occured.
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.
Here is the pip list:
I am confused that I followed step by step according to the instruction to ensure for the compatibility of torch and torchvision but still encounter the same problem. Anyone has solution for this problem?