OK, in that case it looks like your PyTorch install is broken.
How did you install it? Could you try to remove PyTorch completely and install it again?
You can find the instructions on the website 126.
If you are using conda, I would recommend to create a new virtual environment for the new install and see if it’s working.