Windows build (out-of-source)

Disclaimer: I am new to source builds of pytorch.

I was able to build and install pytorch successfully, following against a miniconda environment. Two questions remain for me:

  1. torchvision: Is this part of the package? I couldn’t found any egg/whl. Any knobs, I am not aware yet?

  2. Out-of-Source builds gives me the following error:

Building wheel torch-1.1.0a0
-- Building version 1.1.0a0
[0/1] cmd.exe /C "cd /D V:\src\git\pytorch\build\build && C:\Users\micha\Miniconda3\Library\bin\cmake.exe -P cmake_install.cmake"
-- Install configuration: "Release"
Traceback (most recent call last):
  File "..\src\pytorch\", line 734, in <module>
  File "..\src\pytorch\", line 299, in build_deps
  File "v:\src\git\pytorch\src\pytorch\tools\", line 325, in build_caffe2
    shutil.copyfile(proto_file, "caffe2/proto/" + os.path.basename(proto_file))
  File "C:\Users\micha\Miniconda3\lib\", line 121, in copyfile
    with open(dst, 'wb') as fdst:
FileNotFoundError: [Errno 2] No such file or directory: 'caffe2/proto/'

I am not very well-versed in python’s framework, so it is easily possible that I make very simple errors here. My call to comes from my intended build directory for cmake and has the form:

python ..\src\pytorch\ install

Are there any options, providing with the correct build directory in order to transfer this information to cmake? (The mentioned caffe2/proto/ was copied to this build directory - but the leading path seems to be missing).

Unrelated: Would a ‘build’ category possible for this forum (similar to ‘deployment’)?


  1. No, you will need to install it seperately.
  2. Out-of-source builds are not supported. Please do this as an alternative.
cd ..\src\pytorch\
python install