Skip To Main Content
Support Knowledge Base

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

Environment

Python 3.8, pip openvino-dev 2022.1

Description

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.

Resolution

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

Related Products

This article applies to 1 products.