Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Community Manager
1,073 Views

python-opencv can't import cv2

Jump to solution

Hi

I build an full image for Galileo, and want to use python-opencv for some detection things.

However, I tried to import cv2 for python-opencv but failed with below errors.

is there any possible fix for that?

thanks a lot!

root@clanton:~# python

Python 2.7.3 (default, May 10 2014, 15:49:21)

[GCC 4.7.2] on linux2

Type "help", "copyright", "credits" or "license" for more information.

>>> import cv2

/usr/bin/python2.7: symbol 'th_comment_query_count': can't resolve symbol in lib '/usr/lib/libtheoraenc.so.1'.

Traceback (most recent call last):

File "", line 1, in

ImportError: unknown dlopen() error

>>>

Tags (1)
0 Kudos

Accepted Solutions
Highlighted
New Contributor I
34 Views

Looks like you are building the uclibc version of the SD card image: that's the same error I got when trying the uclibc build.

opencv does not work in the uclibc build.

You need to rebuild the SD card image to use eglibc by following the instructions here: http://www.malinov.com/Home/sergey-s-blog/intelgalileo-buildinglinuximage Intel Galileo - Building Linux Image - Malinov Family Web Presence

or by build the IoT image which is here: http://git.yoctoproject.org/cgit/cgit.cgi/meta-intel-iot-devkit/ meta-intel-iot-devkit - Intel IoT Developer Kit metadata

Python bindings for opencv work fine in the eglibc build

View solution in original post

5 Replies
Highlighted
New Contributor I
35 Views

Looks like you are building the uclibc version of the SD card image: that's the same error I got when trying the uclibc build.

opencv does not work in the uclibc build.

You need to rebuild the SD card image to use eglibc by following the instructions here: http://www.malinov.com/Home/sergey-s-blog/intelgalileo-buildinglinuximage Intel Galileo - Building Linux Image - Malinov Family Web Presence

or by build the IoT image which is here: http://git.yoctoproject.org/cgit/cgit.cgi/meta-intel-iot-devkit/ meta-intel-iot-devkit - Intel IoT Developer Kit metadata

Python bindings for opencv work fine in the eglibc build

View solution in original post

Highlighted
Community Manager
34 Views

thanks a lot.

I will give it a try.

0 Kudos
Highlighted
Community Manager
34 Views

it works for me to change from uclibc to eglibc.

thanks!

0 Kudos
Highlighted
Novice
34 Views

Could you share your eglibc-based image? Or someone already shared it?

0 Kudos
Highlighted
New Contributor II
34 Views

HI @Liam,

Do you also have an idea how can we run python opencv on uclibc image? (I am using http://repo.opkg.net/galileo/images/image-devtools-1.0.4-1.tar.bz2 http://repo.opkg.net/galileo/images/image-devtools-1.0.4-1.tar.bz2)

0 Kudos