Cuda is not available for cuda 12.2

I’ve been trying to setup the pytoch for my conda environment but keep failing. I tried downloaded the latest pytorch with this command: conda install pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch -c nvidia but cuda is still not detected. I am using a virtual envirnment for this. this is my device nvidia-smi.

Maybe try installing the pip wheels with CUDA 12.1 via pip install torch if your conda setup causes issues.