找不到「推論Engine」提供的套件組態檔案
您看到什麼?
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 - 使用 Raspbian* 作業系統的Intel® 發行版 OpenVINO™ 工具組
預先建置的套件包含設定環境變數的設定腳本,以暫時設定執行下列指令的環境變數:
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
注意 | 路徑可能會因您建置目錄的位置而異。 |