Torch not compiled with CUDA enabled Error

I have the Following error raised
loading test data in memory: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 5821/5821 [00:00<00:00, 9485.06it/s]
The output (*args, **kwargs)
The second output (self, /, *args, **kwargs)
Traceback (most recent call last):
File “/home/lambda-quad2/”, line 317, in
File “/home/lambda-quad2/”, line 171, in main
File “/home/lambda-quad2/anaconda3/envs//lib/python3.9/site-packages/torch/cuda/”, line 564, in synchronize
File “/home/lambda-quad2/anaconda3/envs/pedgraph2/lib/python3.9/site-packages/torch/cuda/”, line 221, in _lazy_init
raise AssertionError(“Torch not compiled with CUDA enabled”)
AssertionError: Torch not compiled with CUDA enabled

I did install the pytorch version with cuda enable and I am unsure why I have this error raised I used the Following Link to install pytorch
conda install pytorch torchvision torchaudio cudatoolkit=11.6 -c pytorch -c conda-forge

and when I run the nvidia-smi, I have GPU enabled

Based on the error message you’ve installed a CPU-only version. Check if you have multiple PyTorch installs in your current environment, uninstall them all, and reinstall the desired one.