- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The python code openvinotest.py can run normally if using
python openvinotest.py
However, it goes wrong after wrapping by pyinstaller package.
It will send error messages below, if I executed the openvinotest.exe file
INFO:nncf:NNCF initialized successfully. Supported frameworks detected: openvino
CPU: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
GPU: Intel(R) UHD Graphics 630 (iGPU)
IRmodel\savedmodel.xml
Traceback (most recent call last):
File "openvinotest.py", line 20, in <module>
File "openvino\runtime\ie_api.py", line 507, in read_model
RuntimeError: Exception from src\inference\src\core.cpp:100:
[ GENERAL_ERROR ] Model file IRmodel\savedmodel.xml cannot be opened!
I had search related posts online,
https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/XML-file-not-found/td-p/1226620
https://github.com/openvinotoolkit/openvino/issues/11293
, but any added files cannot make the .exe works. I'm wondering what kinds of linking or files missed during the wrapping process.
python code of openvinotest.py before Line 20:
from openvino.runtime import Core
import cv2
import numpy as np
import time
import subprocess
from pathlib import Path
from nncf import compress_weights
subprocess.call('D:\openvino_2023.1.0\setupvars.bat')
# try:
ie = Core()
devices = ie.available_devices
for device in devices:
device_name = ie.get_property(device, "FULL_DEVICE_NAME")
print(f"{device}: {device_name}")
ir_path = Path("./IRmodel/savedmodel.xml")
print(ir_path)
# ir_path = "D:\\test\\Openvino\\playground\\IRmode\\savedmodel.xml"
model = ie.read_model(model=ir_path)
Environment:
OS: Windows 10
Python: 3.8.10
openvino: 2023.1.0
Python package:
Package Version
------------------------- ------------
about-time 4.2.1
alive-progress 3.1.4
altgraph 0.17.4
attrs 23.1.0
autograd 1.6.2
cma 3.2.2
colorama 0.4.6
contourpy 1.1.1
cycler 0.12.1
Deprecated 1.2.14
dill 0.3.7
fonttools 4.43.1
future 0.18.3
grapheme 0.6.0
importlib-metadata 6.8.0
importlib-resources 6.1.0
joblib 1.3.2
jsonschema 4.19.2
jsonschema-specifications 2023.7.1
jstyleson 0.0.2
kiwisolver 1.4.5
matplotlib 3.7.3
natsort 8.4.0
networkx 2.8.2
ninja 1.10.2.4
nncf 2.6.0
numpy 1.24.4
opencv-python 4.8.1.78
openvino 2023.1.0
openvino-telemetry 2023.2.1
packaging 23.2
pandas 2.0.3
pefile 2023.2.7
Pillow 10.1.0
pip 21.1.1
pkgutil-resolve-name 1.3.10
psutil 5.9.6
pydot 1.4.2
pyinstaller 6.1.0
pyinstaller-hooks-contrib 2023.10
pymoo 0.6.0.1
pyparsing 2.4.7
python-dateutil 2.8.2
pytz 2023.3.post1
pywin32-ctypes 0.2.2
referencing 0.30.2
rpds-py 0.10.6
scikit-learn 1.3.2
scipy 1.10.1
setuptools 56.0.0
six 1.16.0
texttable 1.7.0
threadpoolctl 3.2.0
tqdm 4.66.1
tzdata 2023.3
wrapt 1.15.0
zipp 3.17.0
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi KentWane,
Thanks for reaching out.
For your information, PyInstaller is not officially supported by OpenVINO™.However, there are a few Community members have successfully created the executable file using that. Check out the following cases here:
In your case, make sure you are giving a correct path into your XML file and running the inference in OpenVINO environment.
Regards,
Aznie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi KentWane,
This thread will no longer be monitored since we have provided a solution. If you need any additional information from Intel, please submit a new question.
Regards,
Aznie

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page