Error module torchvision in CUDA 11.4

Naufal_Rizqi: <p>can i ask im install torch version 1.12.0a0+2c916ef.nv22.3 and install torchvision 0.13 in CUDA 11.4  but not compatible, can help me for solution?</p>
<p>Python 3.8.10 (default, Sep 11 2024, 16:02:53)<br>
[GCC 9.4.0] on linux<br>
Type “help”, “copyright”, “credits” or “license” for more information.</p>
<blockquote>
<blockquote>
<blockquote>
<p>import torch<br>
import torchvision<br>
/home/roisc-orin1/.local/lib/python3.8/site-packages/torchvision/io/image.py:13: UserWarning: Failed to load image Python extension:<br>
warn(f"Failed to load image Python extension: {e}")</p>
<p>print(f"PyTorch Version: {torch.<strong>version</strong>}“)<br>
PyTorch Version: 1.12.0a0+2c916ef.nv22.3<br>
print(f"Torchvision Version: {torchvision.<strong>version</strong>}”)<br>
Torchvision Version: 0.13.0</p>
</blockquote>
</blockquote>
</blockquote>

ptrblck: <p>Could you describe what kind of error is pointing to the incompatibility?</p>

Naufal_Rizqi: <p>like this</p>
<p>home/roisc-orin1/.local/lib/python3.8/site-packages/torchvision/io/image.py:13: UserWarning: Failed to load image Python extension:<br>
warn(f"Failed to load image Python extension: {e}")</p>
<p>Traceback (most recent call last):<br>
File “yolo.py”, line 27, in <br>
results = model.predict(source=resized_frame)<br>
File “/home/roisc-orin1/.local/lib/python3.8/site-packages/torch/autograd/grad_mode.py”, line 27, in decorate_context<br>
return func(*args, **kwargs)<br>
File “/home/roisc-orin1/.local/lib/python3.8/site-packages/ultralytics/yolo/engine/model.py”, line 253, in predict<br>
return self.predictor.predict_cli(source=source) if is_cli else self.predictor(source=source, stream=stream)<br>
File “/home/roisc-orin1/.local/lib/python3.8/site-packages/ultralytics/yolo/engine/predictor.py”, line 184, in <strong>call</strong><br>
return list(self.stream_inference(source, model))  # merge list of Result into one<br>
File “/home/roisc-orin1/.local/lib/python3.8/site-packages/torch/autograd/grad_mode.py”, line 43, in generator_context<br>
response = gen.send(None)<br>
File “/home/roisc-orin1/.local/lib/python3.8/site-packages/ultralytics/yolo/engine/predictor.py”, line 244, in stream_inference<br>
self.results = self.postprocess(preds, im, im0s)<br>
File “/home/roisc-orin1/.local/lib/python3.8/site-packages/ultralytics/yolo/v8/pose/predict.py”, line 16, in postprocess<br>
preds = ops.non_max_suppression(preds,<br>
File “/home/roisc-orin1/.local/lib/python3.8/site-packages/ultralytics/yolo/utils/ops.py”, line 246, in non_max_suppression<br>
i = torchvision.ops.nms(boxes, scores, iou_thres)  # NMS<br>
File “/home/roisc-orin1/.local/lib/python3.8/site-packages/torchvision/ops/boxes.py”, line 40, in nms<br>
_assert_has_ops()<br>
File “/home/roisc-orin1/.local/lib/python3.8/site-packages/torchvision/extension.py”, line 33, in _assert_has_ops<br>
raise RuntimeError(<br>
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 <a href="https://github.com/pytorch/vision#installation" class="inline-onebox" rel="noopener nofollow ugc">GitHub - pytorch/vision: Datasets, Transforms and Models specific to Computer Vision</a> for the compatibility matrix. Please check your PyTorch version with torch.<strong>version</strong> and your torchvision version with torchvision.<strong>version</strong> and verify if they are compatible, and if not please reinstall torchvision so that it matches your PyTorch install.</p>