Pytorch not building with cmake in Developer Console
I've mostly used languages with simple IDEs until now, so I don't have the best knowledge of compiling and running git and cmake and everything else through command line. I need to use Pytorch for a project though, so it's necessary to use those skills. I'm installing it according to the tutorial for windows found here:

https://caffe2.ai/docs/getting-started.html?platform=windows&amp;configuration=compile

I've gotten to the point where I'm running build_windows.bat, but I'm getting this output with an error from the Developer Command Prompt.

The system cannot find the drive specified.
Requirement already satisfied: pyyaml in g:\programs\python27\lib\site-packages (3.13)
CAFFE2_ROOT=G:\Programs\Caffe2\pytorch\scripts\..
CMAKE_GENERATOR="Visual Studio 14 2015 Win64"
CMAKE_BUILD_TYPE=Release
-- Selecting Windows SDK version  to target Windows 10.0.17134.
CMake Error at CMakeLists.txt:6 (project):
  Failed to run MSBuild command:

    MSBuild.exe

  to get the value of VCTargetsPath:

    Microsoft (R) Build Engine version 15.8.169+g1ccb72aefa for .NET Framework
    Copyright (C) Microsoft Corporation. All rights reserved.

    Build started 9/25/2018 4:20:32 PM.
    Project "G:\Programs\Caffe2\pytorch\build\CMakeFiles\3.12.2\VCTargetsPath.vcxproj" on node 1 (default targets).
    G:\Programs\Caffe2\pytorch\build\CMakeFiles\3.12.2\VCTargetsPath.vcxproj(14,2): error MSB4019: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the &lt;Import&gt; declaration is correct, and that the file exists on disk.
    Done Building Project "G:\Programs\Caffe2\pytorch\build\CMakeFiles\3.12.2\VCTargetsPath.vcxproj" (default targets) -- FAILED.

    Build FAILED.

    "G:\Programs\Caffe2\pytorch\build\CMakeFiles\3.12.2\VCTargetsPath.vcxproj" (default target) (1) -&gt;
      G:\Programs\Caffe2\pytorch\build\CMakeFiles\3.12.2\VCTargetsPath.vcxproj(14,2): error MSB4019: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the &lt;Import&gt; declaration is correct, and that the file exists on disk.

        0 Warning(s)
        1 Error(s)

    Time Elapsed 00:00:00.15


  Exit code: 1



-- Configuring incomplete, errors occurred!
See also "G:/Programs/Caffe2/pytorch/build/CMakeFiles/CMakeOutput.log".
"Caffe2 building failed"


The CMakeOutput.log file only contains this:

The system is: Windows - 10.0.17134 - AMD64


Which isn't very useful. I'm not sure what I'm doing wrong here.

If you just need to test or experiment with pytorch I suggest that you first try to install it through the pip package. It is much easier.

If you really need to install it from source, then I suggest that you read the build_windows.bat file to check that it really suits your configuration and modify it if needed. Make sure you are targeting the correct Visual Studio version for example.

The error you are getting doesn't seem to come from the pytorch project itself.
