No CUDA device available


I have problems with the detection of CUDA:

When I try the following code, the result is always “Not available”:

import cv2
from ultralytics import YOLO
import numpy as np
import torch

print(“Not available”)

I want to use YOLOv8, therefore I installed Python 3.8.12 in a virtual environment. I use torch in the version 1.12.1, if I user other version the prediction step with yolo results in a “Illegal instruction” error. The torchvision version is 0.13.0.

Thank you in advance!


We only provide the Python 3.6 package for the JetPack 4 environment.
Please build Pytorch from the source with CUDA support if 3.8 is needed.

Please find the building instructions in the below topic:

> Instructions
>> Build from Source


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.