Following is a simple code which I tried on Ubuntu and it works, but it does not work on Windows. On Windows, it gives the same error (RuntimeError: No rendezvous handler for tcp://) when init_process_group() is called.
import torch.distributed as dist

dist_url = 'tcp://127.0.0.1:23456'
dist.init_process_group(
   backend = 'nccl',
   rank=0,
   init_method=dist_url,
   world_size=1)
print("Done")