See https://github.com/openvinotoolkit/openvino/blob/master/docs/dev/build_windows.md for full OpenVINO build instructions
- Microsoft Visual Studio 2019 or higher, version 16.3 or later
- CMake 3.23 or higher (Visual Studio 2022 version is fine)
- Git for Windows
- NSIS
- WGET
- OpenVINO will be installed in
C:\Users\UserName\tools\openvino. Modify the--prefixargument in the--installline to change that. - We build a very minimal OpenVINO build, disabling among others AUTO, Python and NPU support. To enable NPU support remove
-DENABLE_INTEL_NPU=OFFetc. See [CMake options for custom compilation] for an overview of options. (https://github.com/openvinotoolkit/openvino/blob/master/docs/dev/cmake_options_for_custom_compilation.md) - To prevent potential environment conflicts, it is recommended to open a new Developer Command Prompt to run these steps.
NOTE: This example assumes that you have not cloned OpenVINO and OpenVINO GenAI yet. If you already cloned them, run
git pullandgit submodule update --init --recursivefor both repositories. Thecmakecommand below assumes thatopenvinoandopenvino.genaiare both cloned in the same parent directory. If that is not the case, adjust the path for-DOPENVINO_EXTRA_MODULESto the path to youropenvino.genairepository.
NOTE: if you're running into issues, you may want to set an absolute path to openvino.genai as argument to
-DOPENVINO_EXTRA_MODULESin thecmakecommand below.
git clone --recursive https://github.com/openvinotoolkit/openvino.genai.git
git clone --recursive https://github.com/openvinotoolkit/openvino.git
cd openvino
mkdir build && cd build
cmake -G "Visual Studio 17 2022" -DENABLE_AUTO=OFF -DENABLE_AUTO_BATCH=OFF -DENABLE_PROXY=OFF -DENABLE_DOCS=OFF -DENABLE_OV_ONNX_FRONTEND=OFF -DENABLE_OV_PADDLE_FRONTEND=OFF -DENABLE_OV_TF_FRONTEND=OFF -DENABLE_OV_TF_LITE_FRONTEND=OFF -DENABLE_OV_PYTORCH_FRONTEND=OFF -DENABLE_OV_JAX_FRONTEND=OFF -DENABLE_MULTI=OFF -DENABLE_HETERO=OFF -DENABLE_TEMPLATE=OFF -DENABLE_PYTHON=OFF -DENABLE_WHEEL=OFF -DENABLE_SAMPLES=OFF -DENABLE_INTEL_NPU=OFF -DENABLE_FASTER_BUILD=ON -DOPENVINO_EXTRA_MODULES='..\..\openvino.genai' ..
cmake --build . --config Release --verbose --parallel
cmake --install . --prefix %USERPROFILE%\tools\openvinoRun %USERPROFILE%\tools\openvino\setupvars.bat (setupvars.ps1 for PowerShell) and compile your application
Note
See the Tips section at the bottom of this document if you want to enable Python in your build.
See https://github.com/openvinotoolkit/openvino/blob/master/docs/dev/build_linux.md for full OpenVINO build instructions.
- CMake 3.23 or higher
- GCC 7.5 or higher
- Git
- OpenVINO will be installed in
$HOME/tools/openvino. Modify the--prefixargument in the--installline to change that. - We build a very minimal OpenVINO build, disabling among others AUTO, Python and NPU support. GPU support is enabled in the build, provided GPU drivers are installed. To enable NPU support remove
-DENABLE_INTEL_NPU=OFFetc. See [CMake options for custom compilation] for an overview of options. (https://github.com/openvinotoolkit/openvino/blob/master/docs/dev/cmake_options_for_custom_compilation.md) - To prevent potential environment conflicts (for example from a Python virtual environment, or from previously ran setupvars), it is recommended to open a new terminal to run these steps.
NOTE: This example assumes that you have not cloned OpenVINO and OpenVINO GenAI yet. If you already cloned them, run
git pullandgit submodule update --init --recursivefor both repositories. Thecmakecommand below assumes thatopenvinoandopenvino.genaiare both cloned in the same parent directory. If that is not the case, adjust the path for-DOPENVINO_EXTRA_MODULESto the path to youropenvino.genairepository.
git clone --recursive https://github.com/openvinotoolkit/openvino.genai.git
git clone --recursive https://github.com/openvinotoolkit/openvino.git
cd openvino
sudo ./install_build_dependencies.sh
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_AUTO=OFF -DENABLE_AUTO_BATCH=OFF -DENABLE_PROXY=OFF -DENABLE_DOCS=OFF -DENABLE_OV_ONNX_FRONTEND=OFF -DENABLE_OV_PADDLE_FRONTEND=OFF -DENABLE_OV_TF_FRONTEND=OFF -DENABLE_OV_TF_LITE_FRONTEND=OFF -DENABLE_OV_PYTORCH_FRONTEND=OFF -DENABLE_OV_JAX_FRONTEND=OFF -DENABLE_MULTI=OFF -DENABLE_HETERO=OFF -DENABLE_TEMPLATE=OFF -DENABLE_PYTHON=OFF -DENABLE_WHEEL=OFF -DENABLE_SAMPLES=OFF -DENABLE_INTEL_NPU=OFF -DENABLE_FASTER_BUILD=ON -DCMAKE_SKIP_INSTALL_RPATH=OFF -DENABLE_LIBRARY_VERSIONING=OFF -DOPENVINO_EXTRA_MODULES=$(pwd)/../../openvino.genai ..
cmake --build . --parallel
cmake --install . --prefix $HOME/tools/openvinoRun source $HOME/tools/openvino/setupvars.sh and compile your application
- Install the requirements for Python. From the parent directory of openvino/openvino.genai:
pip install -r openvino.genai/requirements-build.txt
pip install -r openvino/src/bindings/python/wheel/requirements-dev.txt- set
-DENABLE_PYTHON=ONwhen running cmake. Sometimes CMake can't find the correct Python, then you can set the Python executable to be used, for example:-DPython3_EXECUTABLE=/usr/local/bin/python3.12 - run
pip install --no-deps openvino-tokenizers numpyin your inference environment. OpenVINO Tokenizers needs to be the same version as OpenVINO, so if you're not building from a release tag, usepip install --pre --no-deps --upgrade openvino-tokenizers --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightlyand specify a version (i.e.openvino-tokenizers==2025.0.*) if needed. Note theno-depsin the pip install commands! It is recommended to create a clean virtual environment to install these dependencies.