- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
openvino version:2020.4.287
device: GPU
When I executed the exe file packaged by pyinstaller, the following errors occurred:
Traceback (most recent call last):
File "main.py", line 8, in from DeepLearningDetection import DeepLearingDetection
File "d:\python3.6.5\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 493, in exec_module exec(bytecode, module.__dict__)
File "DeepLearningDetection.py", line 5, in from openvino.inference_engine import IECore
File "d:\python3.6.5\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 493, in exec_module exec(bytecode, module.__dict__)
File "openvino\inference_engine\__init__.py", line 1, in File "ie_api.pyx", line 24, in init openvino.inference_engine.ie_api
ModuleNotFoundError: No module named 'openvino.inference_engine.constants'
[18212] Failed to execute script main
To trace the problem, I used to following sample program (test.py) to test:
from openvino.inference_engine import IECore
def load():
ie = IECore()
model_bin = "E:\\TrainFasterRCNNResnet50_V2\\OpenvinoModel\\frozen_inference_graph.bin"
model_xml = "E:\\TrainFasterRCNNResnet50_V2\\OpenvinoModel\\frozen_inference_graph.xml"
net = ie.read_network(model=model_xml, weights=model_bin)
print("Device info: CPU")
device="CPU"
print("Loading model to the device")
print("Loading model to the device")
exec_net = ie.load_network(network=net, device_name=device)
print(exec_net)
print("model loaded")
load()
And then :
pyinstaller -F -add-data --add-data "C:\Program Files (x86)\IntelSWTools\openvino_2020.4.287\deployment_tools\inference_engine\bin\intel64\Release\plugins.xml;." test.py
However, when I executed the exe file, another errors came:
E:\PythonProgram\Openvino2Exe\dist>TestOpenvino.exe Traceback (most recent call last):
File "TestOpenvino.py", line 2, in File "d:\python3.6.5\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 493, in exec_module exec(bytecode, module.__dict__)
File "openvino\inference_engine\__init__.py", line 1, in File "ie_api.pyx", line 16, in init openvino.inference_engine.ie_api
ModuleNotFoundError: No module named 'pathlib'
[12704] Failed to execute script TestOpenvino
Note that I have already installed the pathlib package and the it went fine when I execute test.py via python. I don't know why. Are there any instructions on how to package an openvino application into exe by pyinstaller?
- Tags:
- OpenVino
- pyinstaller
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page