I fail to find the words to express my appreciation @peterjc123!
I’ll note a few extra caveats I encountered in case someone else has the same problems I did.
My paths for the intel components contain invalid characters (namely spaces) which led to an error like:
The C compiler "*\cl.exe" is not able to compile a simple test program.
Reinstalling to a valid path like C:\IntelSWTools fixed that problem.
Then I encountered a LNK 1257 : code generation failed error, which stemmed from having VC++ 2015.3 v14.00 (v140) (in previous screen shot, installed). Since this package is a requirement during the installation of the nvidia components for windows there probably should be an explicit step/reminder in the readme for it’s removal
My final build script is a combination of the the information provided here and these issues:


https://github.com/pytorch/pytorch/issues/8150 1  and 8394

https://github.com/peterjc123/pytorch-scripts/issues/23 2 – highlighted the problem with vc++ 2015

conda create -n pyto python=3.6 -y
activate pyto

conda install numpy pyyaml mkl mkl-include setuptools cmake cffi typing pandas seaborn plotly scipy statsmodels jupyter notebook cython tbb -y
pip --no-cache-dir install cufflinks 
pip --no-cache-dir install sklearn
pip --no-cache-dir install tbb

cd %USERPROFILE%
git clone --recursive https://github.com/pytorch/pytorch
cd pytorch

python setup.py clean

set "VS150COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build"
set CMAKE_GENERATOR=Visual Studio 15 2017 Win64

set DISTUTILS_USE_SDK=1
call "%VS150COMNTOOLS%\vcvarsall.bat" x64 -vcvars_ver=14.11

set ANACONDA_ROOT=%USERPROFILE%\Anaconda3
export CMAKE_PREFIX_PATH=%ANACONDA_ROOT%\envs\pyto
set MKLProductDIR=C:\IntelSWTools\compilers_and_libraries_2018.3.210\windows

set USER_LDFLAGS=/LIBPATH:%ANACONDA_ROOT%\envs\pyto\Library\lib /LIBPATH:%MKLProductDir%\mkl\lib\intel64_win /LIBPATH:%MKLProductDir%\tbb\lib\intel64\vc14 /LIBPATH:%ANACONDA_ROOT%\Library\lib
set CMAKE_INCLUDE_PATH=%ANACONDA_ROOT%\envs\pyto\Library\include

set LIB=%MKLProductDir%\mkl\lib\intel64_win;%LIB%
set LIB=%MKLProductDIR%\tbb\lib\intel64_win\vc14;%LIB%
set LIB=%ANACONDA_ROOT%\Library\lib;%LIB%
set LIB=%ANACONDA_ROOT%\envs\pyto\Library\lib;%LIB%

set LD_LIBRARY_PATH=%MKLProductDIR%\tbb\lib\intel64_win\vc14;%LD_LIBRARY_PATH%
set LIBRARY_PATH=%MKLProductDIR%\tbb\lib\intel64_win\vc14;%LIBRARY_PATH%
set CMAKE_INCLUDE_PATH=%MKLProductDIR%\mkl\include;%CMAKE_INCLUDE_PATH%

python setup.py install

Cheers,
A.Noob