The detected CUDA version (11.5) mismatches the version that was used to compile PyTorch (12.2)

@developer.makarov changing CUDA version shouldn’t be required, did you build torchvision from source (like shown under the Installation section of PyTorch for Jetson thread) or did you pip install torchvision ? If the later, you need to build it from source.

Also, unsure with how your virtualenv could be impacting the CUDA version it is reporting. What happens outside of virtualenv? You can also use l4t-pytorch container or torchvision container from jetson-containers - those have the working PyTorch/torchvision wheels in them that you can extract/use even if you don’t want to use container.