I had that problem when I compiled Pytorch for Python 3.6 in Windows then tried installing it again for a Python 3.7 environment.  Instead, I did the following:


Switch to the python 3.7 environment, e.g. activate python3.7 (or whatever you named the environment)


Run python setup.py clean


Then recompile (using python setup.py install or cuda90.bat if using Peterjc123’s scripts 73.)