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

Import error (OpenCV) inside OpenVino Environment

Hartmann__Patrick
1,453 Views

Hello @everyone,

when trying to run an app inside the OpenVino Environment that imports OpenCV I received following Import Error:

 

Traceback (most recent call last):
  File "app.py", line 2, in <module>
    import cv2
ImportError: dlopen(/opt/intel/openvino_2019.3.376/python/python3/cv2.so, 2): Symbol not found: _PyBytes_AsString
  Referenced from: /opt/intel/openvino_2019.3.376/python/python3/cv2.so
  Expected in: flat namespace
 in /opt/intel/openvino_2019.3.376/python/python3/cv2.so

 

I ran all verification scripts successfully after installing the toolkit and also was able so far to download pre-trained models from the OpenVino Model Zoo. Does anyone has an idea and or guidance on what I can do about it?

0 Kudos
1 Solution
Hartmann__Patrick
1,453 Views

Thanks, actually just the change from

python

to

python3

did the trick. Using just "python" refers to an outdated version that comes preinstalled with macOS.

View solution in original post

0 Kudos
2 Replies
Maksim_S_Intel
Employee
1,453 Views

What is your platform and Python version? Add full output of the command:

python3 -c 'import cv2'

 

0 Kudos
Hartmann__Patrick
1,454 Views

Thanks, actually just the change from

python

to

python3

did the trick. Using just "python" refers to an outdated version that comes preinstalled with macOS.

0 Kudos
Reply