Torch not compiled with CUDA enabled

Hi,

I’m working on the Ubuntu 20.04 with GTX 1080 Ti.

I created a conda env and assign the python=3.9. Later i installed cudatoolkit 11.8 with the command
conda install -c "nvidia/label/cuda-11.8.0" cuda-toolkit
and installed pytorch with
conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia.

But then the sequence of commands:

import torch

print(torch.cuda.is_available())

torch.zeros(1).cuda()

returned False and raised error: Torch not compiled with CUDA enabled respectively.

I thought it could be the compatibility problem, but i checked the cersions of pytorch, cuda, gpu version, there’s nothing wrong. Could some give me some suggestions?