Could not find any instance of Visual Studio

Hi, I am trying to build PyTorch from source but it does not seem to work.
I have installed these dependencies: numpy ninja pyyaml mkl mkl-include setuptools cmake cffi typing
I also have visual studio 2019 installed and set the CMake generator flag.

PS D:\University_of_Manchester\Projects\readocs\pytorch> cmd                                                                                                                                                       Microsoft Windows [版本 10.0.18363.592]
(c) 2019 Microsoft Corporation。保留所有权利。

| D:\University_of_Manchester\Projects\readocs\pytorch =>set CMAKE_GENERATOR=Visual Studio 16 2019

| D:\University_of_Manchester\Projects\readocs\pytorch =>py install
Building wheel torch-1.5.0a0+6ad9e5c
-- Building version 1.5.0a0+6ad9e5c
cmake --build . --target install --config Release -- /maxcpucount:8
CMake Error:

    Visual Studio 15 2017

  could not find any instance of Visual Studio.

Traceback (most recent call last):
  File "", line 737, in <module>
  File "", line 316, in build_deps
  File "D:\University_of_Manchester\Projects\readocs\pytorch\tools\", line 62, in build_caffe2
  File "D:\University_of_Manchester\Projects\readocs\pytorch\tools\setup_helpers\", line 339, in build, my_env)
  File "D:\University_of_Manchester\Projects\readocs\pytorch\tools\setup_helpers\", line 141, in run
    check_call(command, cwd=self.build_dir, env=env)
  File "C:\Users\wweilue\AppData\Local\Programs\Python\Python37\lib\", line 347, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--target', 'install', '--config', 'Release', '--', '/maxcpucount:8']' returned non-zero exit status 1.

| D:\University_of_Manchester\Projects\readocs\pytorch => 

Could you please try py install --cmake?