# Is building from source for windows up to date? (subprocess.CalledProcessError: Command '\['cmake', ..\] returned non-zero exit status 1 error)

**URL:** <https://discuss.pytorch.org/t/is-building-from-source-for-windows-up-to-date-subprocess-calledprocesserror-command-cmake-returned-non-zero-exit-status-1-error/90769>\
**Category:** windows\
**Created:** [July 28, 2020, 5:11am UTC](https://discuss.pytorch.org/t/is-building-from-source-for-windows-up-to-date-subprocess-calledprocesserror-command-cmake-returned-non-zero-exit-status-1-error/90769 "2020-07-28T05:11:54Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Shisho\_Sama](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/shisho_sama/32/6926_2.png) [@Shisho\_Sama](https://discuss.pytorch.org/u/Shisho_Sama)\
**Post date:** [July 28, 2020, 7:02am UTC](https://discuss.pytorch.org/t/is-building-from-source-for-windows-up-to-date-subprocess-calledprocesserror-command-cmake-returned-non-zero-exit-status-1-error/90769/2 "2020-07-28T07:02:08Z")

</div>

Looking at this [link](https://discuss.pytorch.org/t/pytorch-build-from-source-on-windows/40288/9) everything built successfully! without even the need for any of these :

```auto
:: [Optional] If you want to build with VS 2019 generator, please change the value in the next line to `Visual Studio 16 2019`.
:: Note: This value is useless if Ninja is detected. However, you can force that by using `set USE_NINJA=OFF`.
set CMAKE_GENERATOR=Visual Studio 16 2019

:: Read the content in the previous section carefully before you proceed.
:: [Optional] If you want to override the underlying toolset used by Ninja and Visual Studio with CUDA, please run the following script block.
:: "Visual Studio 2017 Developer Command Prompt" will be run automatically.
:: Make sure you have CMake >= 3.12 before you do this when you use the Visual Studio generator.
set CMAKE_GENERATOR_TOOLSET_VERSION=14.11
set DISTUTILS_USE_SDK=1
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=%CMAKE_GENERATOR_TOOLSET_VERSION%

:: [Optional] If you want to override the cuda host compiler
set CUDAHOSTCXX=C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.11.25503\bin\HostX64\x64\cl.exe

python setup.py install

```

I just ran :

```auto
python setup.py build --cmake
python setup.py install

```

and everything got built!  
However, after building everything, I cant seem to be able to find \<torch/torch.h\> ! I read it on this issue [here](https://github.com/pytorch/pytorch/issues/5964#issuecomment-375698855) that building from source will make that but apparently this is not the case here!

Any help is greatly appreciated

---

_[View the full topic](https://discuss.pytorch.org/t/is-building-from-source-for-windows-up-to-date-subprocess-calledprocesserror-command-cmake-returned-non-zero-exit-status-1-error/90769)._
