How to Build Caffe, Pycaffe, Matcaffe on Windows 10 updated video at

Video is ready, Click Here to View ×

Please see the updated video at this link


Visual Studio 2015
CMake 3.4 or higher
Python 3.5 Anaconda x64 (or Miniconda).
CUDA 8.0
cuDNN v5.1 (optional)

caffe source…


  1. i follow your instruction and get this error "The dependency target "pycaffe" of target "pytest" does not exist." Can you please teach me how to solve this problem? Thank you so much.

  2. — python
    CMake Error at cmake/Utils.cmake:69 (string):
    string sub-command STRIP requires two arguments.
    Call Stack (most recent call first):
    cmake/Summary.cmake:98 (caffe_merge_flag_lists)
    CMakeLists.txt:157 (caffe_print_configuration_summary)

  3. Salam,
    How to solve this error:
    Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) (Required is at least version "3.6")
    CMake Error at cmake/WindowsDownloadPrebuiltDependencies.cmake:40 (message):
    Could not find url for MSVC version = 1900 and Python version = ..
    Call Stack (most recent call first):
    CMakeLists.txt:77 (include)

  4. hello! could you please help me with this error? Almost at the end of the building process if it weren't for this 🙁

    C:ProjectscaffebuildCMakeFilesCMakeTmpCheckIncludeFile.c(1): fatal error C1083: Cannot open include file: 'pthread.h': No such file or directory

    ninja: build stopped: subcommand failed.

    Thank you!

  5. Hello
    could you help me for this error please

    CMake Error at cmake/WindowsDownloadPrebuiltDependencies.cmake:29 (message):
    Could not find url for MSVC version = 1800 and Python version = 3.6.
    Call Stack (most recent call first):
    CMakeLists.txt:75 (include)

  6. when I run build_win.cmd, it is showing my cmake_generator as ninja and throwing up an error that 'cmake' is not recognized as an internal or external command, operable program or batch file.
    Please help

  7. i followed the video step by step and thats the last thing i got from the last step

    Error using classification_demo (line 80)
    Please download CaffeNet from Model Zoo before you run this demo

  8. I build caffe with CUDA8.0, CUDNN 5.1 by MS 2013 and Python 3.5 on Window 7 and I have this error:
    error MSB4062: The "NuGetPackageOverlay…" task could not be loaded
    Do you know how to solve it? Thank you!

  9. very helpful caffe build mathod, however, I had a similar MATLAB crash while attempting to test the classification demo and I want to use only CPU computing with Matlab interface… any suggestions?

  10. Hello Shan, great tutorial!! Thanks!
    I build caffe in CPU mode, with VS 2013 along with matcaffe and pycaffe.

    However, I get the same error while using matcaffe: Invalid mex-file, the one as you received.
    I checked the path, it is correct!

    What might be the issue? Thanks alot.

  11. Salam, Indeed a very nice tutorial. I was finally successful after watching this. Now I have a question, I am using windows cmd terminal to test some models with out python or matlab. However, I can not save output to a text file. In Linux we use 2>&1 | tee output.txt  and it save all the prints to the output.txt file. However in windows it does not save even using only > output.txt.  Any suggestion how to save the output to a text file? will be thankful.

  12. Thank you! Very useful video.

    But I have a problem when i try "scriptsbuild_win.cmd".
    "cmake" is not recognized as an internal or external command, operable program or batch file.
    I tried to use cmake 3.7.1 and cmake 3.6.3.
    Do you have suggestions how can I solve this problem?

Leave a Reply

Your email address will not be published.