Couple of questions:

Do you have the Nvidia GPU card plugged in? Have you installed the GPU driver for your Nvidia card?
Have you installed VS 2019 Redist https://aka.ms/vs/16/release/vc_redist.x64.exe 15?
There isn’t raise err in line 103 of __init__.py for v1.5.1 binaries. Are you sure you installed the correct version? See https://github.com/pytorch/pytorch/blob/v1.5.1/torch/__init__.py 6