- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to run the hello_query_device.py sample from within VS2019.
When it gets to the statement on line 2:
from openvino.inference_engine import IECore
it throws an error: no module named 'openvino'
I am using PYthon 3.7, and this environment has openvino(2021.2) loaded.
I know it's probably something to do with the environmenet variable but I don't see any references to loading and environment variable to find openvino if you are using VS2019.
Any ideas?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Indeed, you need to run the setupvars in the interface that you are using(eg:cmd or visual studio terminal,etc).
Otherwise, you won't be able to do inferencing or even run a simple demo as the OpenVINO packages are not linked together as per setupvars function.
Sincerely,
Iffa
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Greetings,
This is how you can create your own project in OpenVINO suing visual studio:
https://www.youtube.com/watch?v=_z_YYanhE2I
Sincerely,
Iffa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There are no solution files in my directories for openvino.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
For Python samples or demos you should be able to run as it is compiled through an interpreter unlike the C++ which is pre-compiled.
You may refer here: https://docs.openvinotoolkit.org/latest/openvino_inference_engine_ie_bridges_python_sample_hello_query_device_README.html
Sincerely,
Iffa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Iffa,
Thank you for your kind reply. I realize it's like teaching string theory to a five year old but I feel I have made some progress. Running the Hello_Query sample in a command window gives the same result as running it from VS2029. It hits the "import openvino" statement and throws an error "no module openvino found" attached please find a copy of the text in the command window.
regards,
netspin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Eureka! Surprise to no one. If I run setupvars.bat in the same command window before running the sample hello_query_device.py, it runs fine generating a whole bunch of output I have yet to interpret. When I connect my Neural Compute Stick 2, it also detects that as a Myriad device.
Now all I have to figure out is how to do the same thing inside of Visual Studio 2019.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Indeed, you need to run the setupvars in the interface that you are using(eg:cmd or visual studio terminal,etc).
Otherwise, you won't be able to do inferencing or even run a simple demo as the OpenVINO packages are not linked together as per setupvars function.
Sincerely,
Iffa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Iffa,
thank you for your kind reply.
what i realize now is that I can use VS2019 as my IDE to construct the python programs using calls to openvino. The programs then need to be run in a command window following calls to setupvars.bat, or demo_speech_recognition.bat, whatever is appropriate.
Thank you for your assistance.
I will mark this as closed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Greetings,
Glad to hear that.
Intel will no longer monitor this thread since this issue has been resolved. If you need any additional information from Intel, please submit a new question.
Sincerely,
Iffa

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