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’m looking forward for any suggestion/help… thanks…
Based on the log, the packages are not compatible.
Could you share the JetPack, PyTorch, and the TorchVision version you installed with us?
A known working combination is PyTorch v2.0.0 + Torchvision v0.14.1.
Or you can try our container with both PyTorch and TorchVision installed for simplicity.
I might misunderstand the system Python you mentioned.
Do you mean you create the virtual environment with Python 3.8 (JetPack 5.1.2) and it works?
But since we only provide the package for the default Python version, you will need to build from the source for other python versions.
If I create a virtual environment with the same Python version as system’s Python (3.8), it doesn’t work. If I install it directly on the system Python (at $HOME/.local/lib/python3.8/site-packages), it works.
The error shows RuntimeError: Couldn't load custom C++ ops..
Somehow the package can load the module natively but not within a virtual environment.
Sorry that we don’t know the implementation details since this is a third-party library.
But since the package can work natively, creating the environment with --system-site-packages should help you access the C-based library on the system.