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.

python samples

Morishige__Akihito
1,136 Views

When I run the python samples, error is occures as follows.

    from openvino.inference_engine import IENetwork, IEPlugin
ImportError: No module named 'openvino'

How do I download the openvimo module ?

0 Kudos
1 Solution
Monique_J_Intel
Employee
1,136 Views

Hi Akihito,

You may want to try setting up the OpenVINO environment variables:

source /opt/intel/computer_vision_sdk/bin/setupvars.sh

If that doesn't work then can you answer the following questions:

1.)What version of OpenVINO are you using?

2.)What is the command that you are using to run the sample?

Kind Regards,

Monique Jones

View solution in original post

0 Kudos
6 Replies
Monique_J_Intel
Employee
1,137 Views

Hi Akihito,

You may want to try setting up the OpenVINO environment variables:

source /opt/intel/computer_vision_sdk/bin/setupvars.sh

If that doesn't work then can you answer the following questions:

1.)What version of OpenVINO are you using?

2.)What is the command that you are using to run the sample?

Kind Regards,

Monique Jones

0 Kudos
nikos1
Valued Contributor I
1,136 Views

Yes, indeed, this is the typical error you get if you don't source setupvars.sh .  After sourcing runs fine here in R3,

0 Kudos
Morishige__Akihito
1,136 Views

 After sourcing setupvars.sh, sample works well.

Thanks a lot.

0 Kudos
Michael_D_Intel2
Employee
1,136 Views

I have the same problem but source setupvars.sh doesn't eliminate the problem. It is strange since I didn't have this problem but after I did a reboot and source the setupvars.sh the script which woked fine before now it gives me this:

movidius@movidius-desktop:~/intel/ncappzoo/caffe/vgg16$ ./source_setupvars.sh
[setupvars.sh] OpenVINO environment initialized
movidius@movidius-desktop:~/intel/ncappzoo/caffe/vgg16$ make run_py

making caffemodel
caffemodel file already exists

making prototxt
prototxt file already exists

making deps

making data
(cd ../../data/ilsvrc12; make)
make[1]: Entering directory '/home/movidius/intel/ncappzoo/data/ilsvrc12'
make[1]: Leaving directory '/home/movidius/intel/ncappzoo/data/ilsvrc12'

making compile
compiled model already exists

making run_cpp
python3 ../../apps/simple_classifier_py/simple_classifier.py -m VGG_ILSVRC_16_layers.xml -d MYRIAD -i ../../data/images/nps_electric_guitar.png;
Traceback (most recent call last):
  File "../../apps/simple_classifier_py/simple_classifier.py", line 24, in <module>
    from openvino.inference_engine import IENetwork, IEPlugin
ImportError: No module named 'openvino'
Makefile:143: recipe for target 'run_py' failed
make: *** [run_py] Error 1
movidius@movidius-desktop:~/intel/ncappzoo/caffe/vgg16

0 Kudos
Michael_D_Intel2
Employee
1,136 Views

The following steps helped to get rid of all the errors and eliminate some extra steps:
1st step:
sudo rm /usr/bin/python
sudo ln -sfn /usr/bin/python3.5 /usr/bin/python
 
2nd step in .bashrc add these lines:
source /home/movidius/intel/computer_vision_sdk/bin/setupvars.sh
echo PYTHONPATH=$PYTHONPATH


So, now I don'’t have to worry what version of python is used because I forced it to 3.5 and is there every new terminal I open.
The source of setupvars.sh in .bashrc eliminates the step of sourcing every time you are in a new terminal.

 

0 Kudos
lai__autumn
Beginner
1,136 Views

Hi, I'm run openvino demo:

python3 object_detection_demo_yolov3_async.py --labels /home/pi/Downloads/OpenVINO-YoloV3-master/coco.names -i /home/pi/Desktop/20190413_092723A.mp4 -m /home/pi/Desktop/frozen_darknet_yolov3_model.xml -d MYRIAD --cpu_extension /opt/intel/openvino/deployment_tools/inference_engine/lib/armv7l/libcpu_extension.so 

error:

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

 

How to solve it? 

Thank you!

 

0 Kudos
Reply