Problem to install pytorch cuda12.2 with conda

Hello
i’m trying to install pytorch-gpu for cuda12.2 but i can’t do it.


i did try with:
conda install pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch-nightly -c nvidia
but when i check the device with :

device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
print(f"Using device: {device}")

i get cpu