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.
6482 Discussions

No module named "openvino" error in Raspberry Pi 3

V_B__Anakha
Beginner
1,911 Views

Hi, 

I am trying to run some classification problems on MYRIAD using Pi 3. The Pi 3 has the Rapsbian OS - Buster with python 3.7 pre-installed. 

I have added the source /opt/intel/openvino/bin/setupvars.sh in the bashrc and it gives a message "OPENVINO environment is initialized". 

I am using Openvino 2019 R2.

When I try to run the calssification_sample.py, I keep getting the following errror. 

Traceback (most recent call last):
  File "classification_sample.py", line 25, in <module>
    from openvino.inference_engine import IENetwork, IEPlugin
ModuleNotFoundError: No module named 'openvino'
 

I have also added the PYTHONPATH in the .bashrc file as shown below. 

$PYTHONPATH: /opt/intel/openvino/python/python3.5/armv7l/

However the error still persists. Any idea on how to resolve this ? 

 

0 Kudos
6 Replies
Shubha_R_Intel
Employee
1,911 Views

Dear V B, Anakha,

First can you kindly try it manually (do not involve .bashrc) - does source /opt/intel/openvino/bin/setupvars.sh followed by classification_sample.py from the same terminal work ? Also are you sure that /opt/intel/openvino/python/python3.5/armv7l/ exists on your system ?

Please reply back on this forum.

Thanks,

Shubha

 

0 Kudos
V_B__Anakha
Beginner
1,911 Views

Hi Shubha, 

I tried the commands manually as you said, but still get the same error. 

And yes, I have this  /opt/intel/openvino/python/python3.5/armv7l/ in my system. 

Is it due to having different python versions? I have python3.7 and the folder is python3.5?

0 Kudos
Kenneth_C_Intel
Employee
1,911 Views

Which python is picked up by default ?

The setup script should set Pythonpath based on the first python it sees on the path. 

 

0 Kudos
Kenneth_C_Intel
Employee
1,911 Views

If that doesnt work you can specify the python version at the time of sourcing with  -pyver  flag

 

0 Kudos
V_B__Anakha
Beginner
1,911 Views

How do I know which python version is picked by default?
Do you suggest to do the following?

 

source /opt/intel/openvino/bin/setupvars.sh -pyver 3.5?

 

0 Kudos
Mas__Juan
Beginner
1,911 Views

Hello,

Try using the import, this worked for me:

from armv7l.openvino.inference_engine import IENetwork, IEPlugin

And if you are using the same script for non-pi systems you could do:

try:
    from armv7l.openvino.inference_engine import IENetwork, IEPlugin
except:
    from openvino.inference_engine import IENetwork, IEPlugin

Hope it helps.

0 Kudos
Reply