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.

ie_api import error in python

s_rad
Beginner
937 Views

Ubuntu 16.04

python 2.7

openvino 2019 R3.1

I am getting the following error even when I source my openvino environment with the right python version (source /opt/intel/openvino/bin/setupvars.sh -pyver 2.7).

 

Traceback (most recent call last):
File "hello_query_device.py", line 3, in <module>
from openvino.inference_engine import IECore
File "/opt/intel/openvino_2019.3.376/python/python2.7/openvino/inference_engine/__init__.py", line 1, in <module>
from .ie_api import *
ImportError: /opt/intel/openvino_2019.3.376/deployment_tools/inference_engine/lib/intel64/libinference_engine.so: undefined symbol: _ZN3tbb10interface78internal15task_arena_base24internal_max_concurrencyEPKNS0_10task_arenaE

 

I have updated my numpy and cython, as suggested by another thread, but nothing works.

The interesting thing is that I was not receiving this error on a freshly installed system. However, after installing ROS, and some other packages I am getting this error now.
I would appreciate any hints.

0 Kudos
3 Replies
Iffa_Intel
Moderator
927 Views

Greetings,


Probably you had temporarily set your environment variables which is the :

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


It's better if you permanently set the environment variables as the OpenVINO environment variables are removed when you close the shell

You can do it as follows:

1.Open the .bashrc file in <user_directory>

vi <user_directory>/.bashrc

2.Add this line to the end of the file:

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

3.Save and close the file: press the Esc key and type :wq.

4.open a new terminal, You will see [setupvars.sh] OpenVINO environment initialized.


you can find these in here : https://docs.openvinotoolkit.org/latest/_docs_install_guides_installing_openvino_linux.html#set-the-environment-variables


Do let me know if this helps

Sincerely,

Iffa


0 Kudos
s_rad
Beginner
923 Views

Hi,
Thank you so much for your quick response.

 

I am already setting my openvino environment in the bashrc. The problem is for sure not the proper sourcing of openvino, cause it would be a different error (the following) if the the source is not set.

ImportError: No module named openvino.inference_engine

 I am not getting this error. I am getting the error in my original post, related to ie_api.
I still cannot solve the issue unfortunately.
Any thoughts on the potential reason behind the issue?

0 Kudos
Max_L_Intel
Moderator
905 Views

Hi @s_rad 

1) What do you see if you set your environment variables with default Python version (without -pyver 2.7)?

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


2) Please have a chance to try latest available OpenVINO toolkit 2020.3 release instead of 2019 R3.1. 

0 Kudos
Reply