无法找到“推断工程”提供的软件包配置文件

文档

错误讯息

000055345

2022 年 04 月 14 日

您看到了什么?

CMake 错误文本

$ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-march=armv7-a" /opt/intel/openvino/deployment_tools/inference_engine/samples

CMake Error at CMakeLists.txt:203 (find_package):
By not providing "FindInferenceEngine.cmake" in CMAKE_MODULE_PATH this
project has asked CMake to find a package configuration file provided by
"InferenceEngine", but CMake did not find one.

Could not find a package configuration file provided by "InferenceEngine"
(requested version 2.0) with any of the following names:

InferenceEngineConfig.cmake
inferenceengine-config.cmake

Add the installation prefix of "InferenceEngine" to CMAKE_PREFIX_PATH or
set "InferenceEngine_DIR" to a directory containing one of the above files.
If "InferenceEngine" provides a separate development package or SDK, be
sure it has been installed.


-- Configuring incomplete, errors occurred!

 

环境

在 Raspberry Pi* 上构建推理引擎样品

 

您为什么会看到它?

此 CMake 错误是在未设置环境变量时引起的。您必须更新多个环境变量,才能编译并运行OpenVINO™工具包应用程序。

 

如何解决

解决方案 1 - 使用 英特尔® 发行版 OpenVINO™ 工具套件 来运行 Raspbian* 操作系统

预构建的软件包包含设置环境变量的设置脚本,以临时设置运行以下命令的环境变量:

source /opt/intel/openvino/bin/setupvars.sh

注意当您关闭终端窗口时,环境变量将被删除。

或者,您可以通过运行以下命令永久设置环境变量:

echo "source /opt/intel/openvino/bin/setupvars.sh" >> ~/.bashrc

解决方案 2 - 使用 OpenVINO™ 工具套件的开源版本

要使用从源代码构建的推断引擎,导出以下变量:

导出ngraph_DIR=/home/pi/openvino/build/ngraph
导出 InferenceEngine_DIR=/home/pi/openvino/build

注意路径可能因您构建目录的位置而异。