GPUs being detected but "RuntimeError: ProcessGroupNCCL is only supported with GPUs, no GPUs found?" HELP!

Hi,

After executing the command to check the availablity of GPU.

python3 -c “import torch; print([(i, torch.cuda.get_device_properties(i)) for i in range(torch.cuda.device_count())])”

output:

[(0, _CudaDeviceProperties(name=‘Tesla V100-SXM2-16GB’, major=7, minor=0, total_memory=16160MB, multi_processor_count=80))]

But still getting error

RuntimeError: ProcessGroupNCCL is only supported with GPUs, no GPUs found!
ERROR:torch.distributed.elastic.multiprocessing.api:failed (exitcode: 1) local_rank: 0 (pid: 17848) of binary: