I’m trying to build PyTorch from source on Windows 10 (as described in pytorch repo), and I’m getting an error:
Building wheel torch-1.1.0a0+542c273
-- Building version 1.1.0a0+542c273
Microsoft (R) Build Engine 15.9.21+g9802d43bc3 dla platformy .NET Framework
Copyright (C) Microsoft Corporation. Wszelkie prawa zastrzeżone.

MSBUILD : error MSB1009: Project file does not exist.
Switch: INSTALL.vcxproj
Traceback (most recent call last):
  File "setup.py", line 710, in <module>
    build_deps()
  File "setup.py", line 282, in build_deps
    build_dir='build')
  File "C:\Users\MarcinM\pytorch\tools\build_pytorch_libs.py", line 250, in build_caffe2
    cwd=build_dir, env=my_env)
  File "C:\Users\MarcinM\AppData\Local\Programs\Python\Python36\lib\subprocess.py", line 291, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['msbuild', 'INSTALL.vcxproj', '/p:Configuration=Release']' returned non-zero exit status 1.

What I’ve done:

git cloned the pytorch repo
Installed VS 2017 15.9.9 Community with checking:

Windows 10 SDK (10.0;16299.0) for Desktop C++ [x86 i x64]
Version 14.11 of toolset for version 15.4 of VC++ 2017


run git submodule update --init --recursive

run pip install numpy pyyaml mkl mkl-include setuptools cmake cffi typing

run:

set "CUDAHOSTCXX=%VS140COMNTOOLS%..\..\VC\bin\amd64\cl.exe"
set CMAKE_GENERATOR=Visual Studio 15 2017 Win64
set DISTUTILS_USE_SDK=1
(edit:) for /f "usebackq tokens=*" %i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -version [15^,16^) -products * -latest -property installationPath`) do call "%i\VC\Auxiliary\Build\vcvarsall.bat" x64 -vcvars_ver=14.11
 
python setup.py install

Is it possible that the order of commands got me this error (I’ve run 4. after installing VS toolsets)?
Can you help me overvcome this error?
Windows 10
python 36
cuda 9.1