I am installing ultralytics(YoloV8) on a new-ish computer with CUDA 12.1 installed. I was trying:
pip3 install torch torchvision torchaudio
but when I run
from ultralytics import YOLO
RuntimeError: Detected that PyTorch and torchvision were compiled with different CUDA major versions. PyTorch has CUDA Version=12.1 and torchvision has CUDA Version=11.7. Please reinstall the torchvision that matches your PyTorch install.
I then tried:
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
But got the same error. How can I resolve this?