ข้อผิดพลาด: "ImportError: การโหลด DLL ล้มเหลว" ขณะดําเนินการไฟล์ปฏิบัติการสคริปต์ OpenVINO™ Python* จาก PyInstaller
ประเภทข้อมูล: ข้อความแสดงข้อผิดพลาด | ID บทความ: 000092459 | การตรวจสอบครั้งล่าสุด: 16/06/2023
สร้างสคริปต์ OpenVINO™ Python:
from openvino.inference_engine import IECore
ie = IECore()
print("Devices:", ie.available_devices)
ดําเนินการบรรทัดต่อไปนี้เพื่อสร้างไฟล์ปฏิบัติการโดยใช้ PyInstaller:
pyinstaller test.py --onefile
พบข้อผิดพลาดต่อไปนี้ขณะเรียกใช้งานไฟล์ปฏิบัติการ:
ImportError: DLL load failed: The specified module could not be found.
ระบุ OpenVINO™ PYTHONPATH ต่อไปนี้ใน pathex: ในไฟล์ .spec:
pathex=['D:\\openvino_install_dir','D:\\openvino_install_dir\openvino_env\\Lib\\site-packages\\openvino\\libs']
เรียกใช้ คําสั่งต่อไปนี้เพื่อสร้างไฟล์ปฏิบัติการจากไฟล์ .spec:
pyinstaller --clean test.spec