I was unable to use pyinstaller to build executable exe.
Below is my test python code.
from openvino.inference_engine import IECore
plugin = IECore()
model_xml = 'test.xml'
model_bin = 'test.bin'
net = plugin.read_network(model=model_xml, weights=model_bin)
exec_net = plugin.load_network(net, "CPU")
exec_net = plugin.load_network(net, "MYRIAD")
And I got the error below.
File "openvino\inference_engine\__init__.py", line 1, in <module>
File "ie_api.pyx", line 24, in init openvino.inference_engine.ie_api
ModuleNotFoundError: No module named 'openvino.inference_engine.constants'
 Failed to execute script t2
And I used the below cmd to build exe.
python -m PyInstaller --add-data "C:\Program Files (x86)\Intel\openvino_2021.2.185\deployment_tools\inference_engine\bin\intel64\Release\plugins.xml;."^ --add-data "C:\Program Files (x86)\Intel\openvino_2021.2.185\deployment_tools\inference_engine\bin\intel64\Release\MKLDNNPlugin.dll;." --add-data "C:\Program Files (x86)\Intel\openvino_2021.2.185\deployment_tools\inference_engine\bin\intel64\Release\myriadPlugin.dll;."^ t2.py
Below is my environment:
OS: Both Windows 10
Python Version : 3.6.8
Pyinstaller Version : 4.1
Openvino Version : openvino_2021.2.185
Thank you for reaching out to us. If possible, could you share your reason for using pyinstaller to build an executable file?
Did you build the OpenVINO toolkit from the GitHub page?
I build the OpenVINO toolkit by the installer.
The original development envirnment is python , this one required to run on the different platforms.
Pyinstaller is a way to create executable file in the Windows platform without install python.
Thank you for your patience. It is not possible to convert an OpenVINO python demo/sample using Pyinstaller. This is due to the OpenVINO path/environment issue.
PyInstaller is not officially supported by OpenVINO. However, some of our Community members have successfully created the executable file using PyInstaller. I share the following cases with you here:
Please also refer to the following link for information on solving the ‘No module’ error.
This thread will no longer be monitored since we have provided examples and references. If you need any additional information from Intel, please submit a new question.