I had the same problem.
I installed PyTorch following this command:
pip install torch==1.5.1+cpu torchvision==0.6.1+cpu -f https://download.pytorch.org/whl/torch_stable.html
However, I noticed that my Python environment had a previous installation of PyTorch+CUDA which was later removed (uninstalled).
What I found is that the uninstalled task was not able to remove all the content (library files such as *.DLLs, etc.) from torch folder in the site-packages directory.  I had to delete manually that folder.  Aftewards, I installed again PyTorch (with the correct version for my environment: no CUDA), and it started to work fine.
Conclusion: This problem is due to existent library files in the torch folder due to previous installations.  One needs to remove them manually before reinstall again the latest version of PyTorch.
Cheers!