Skip To Main Content
Support Knowledge Base

Encountered: “Could Not Find a Package Configuration File Provided by “OpenCV”” When Building Demos Using OpenVINO™ 2022

Content Type: Error Messages   |   Article ID: 000093494   |   Last Reviewed: 05/30/2023

Description

  • Ran the following command to build Open Model Zoo demos:

    source build_demos.sh

  • Encountered the following error:

    Could not find a package configuration file provided by OpenCV* with any of the following names:
    OpenCVConfig.cmake
    opencv-config.cmake

Resolution

For Linux OS:

Run the following command to install OpenCV* from default Ubuntu* repositories:

sudo apt update
sudo apt install libopencv-dev python3-opencv

For Windows OS:

  1. Download OpenCV* windows package on the official OpenCV releases page Windows archive contains VC postfix, e.g.: opencv-4.6.0-vc14_vc15.exe
  2. Extract the archive
  3. Setup environment variables by running the script opencv\build\setup_vars_opencv4.cmd
  4. Run the following command in command prompt:

    set "OpenCV_DIR=<OpenCV_Installation_Dir>\opencv\build"

Additional information

Refer Install prebuilt OpenCV* for additional information.

Related Products

This article applies to 1 products.