Error: “ImportError: DLL Load Failed” When Executing OpenVINO™ Python* Script Executable File from PyInstaller
Content Type: Error Messages | Article ID: 000092459 | Last Reviewed: 06/16/2023
Created an OpenVINO™ Python script:
from openvino.inference_engine import IECore
ie = IECore()
print("Devices:", ie.available_devices)
Executed the following line to build an executable file using PyInstaller:
pyinstaller test.py --onefile
Encountered the following error when running the executable file:
ImportError: DLL load failed: The specified module could not be found.
Provide the following OpenVINO™ PYTHONPATH in pathex: section in the .spec file:
pathex=['D:\\openvino_install_dir','D:\\openvino_install_dir\\openvino_env\\Lib\\site-packages\\openvino\\libs'],
Run the following command to build the executable file from .spec file:
pyinstaller --clean test.spec