Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.
6442 Discussions

pyinstaller command for openvino code in linux system

AjithKJ
Beginner
267 Views

Hi,

 

I have an openvino python code and want to run them in exe file format using pyinstaller.

When I convert them using following command:

pyinstaller --onefile <filename>.py

I'm getting the following error when running the exe file:

ModuleNotFoundError: No module named 'openvino.inference_engine.constants'

 

I tried using --add-binary, --add-data, But the command is not sucessfully running.

pyinstaller --onefile --add-binary "<virtual-env-location>/lib/python3.10/site-packages/openvino/libs/;." --hidden-import pkgutil --hidden-import numpy --hidden-import openvino.inference_engine.constants <filename>.py

 

 

Please let me know the proper command to make in exe file.

 

0 Kudos
2 Replies
Megat_Intel
Moderator
232 Views

Hi AjithKJ,

Thank you for reaching out to us.

 

What is the OpenVINO™ version that you are using, and are you able to run the code in Python? On the other hand, please note that PyInstaller is not officially supported by OpenVINO™

 

From the error message you provided, the code seems to be using the old OpenVINO™ 1.0 API. For your information, starting from OpenVINO™ toolkit 2024, OpenVINO™ C++/C/Python 1.0 APIs have been deprecated. Please refer to the OpenVINO™ API 2.0 Transition Guide to migrate Inference Engine-based applications to OpenVINO™ API 2.0.

 

 

Regards,

Megat


0 Kudos
Megat_Intel
Moderator
136 Views

Hi AjithKJ,

Thank you for your question. This thread will no longer be monitored since we have provided a suggestion. If you need any additional information from Intel, please submit a new question. 

 


Regards,

Megat


0 Kudos
Reply