System Specification:

cuda 10.
Visual Studio 15.9.2
Windows 8.1.

I used the following commands in installation from pytorch website and there’s a screen shot of the error.
set CMAKE_GENERATOR=Visual Studio 15 2017 Win64
set DISTUTILS_USE_SDK=1
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x64 
python setup.py install