Opened 14 years ago

Closed 14 years ago

#26569 closed defect (worksforme)

Problem with python bindings on opencv 2.1

Reported by: phoebebright@… Owned by: stante@…
Priority: Normal Milestone:
Component: ports Version: 1.9.1
Keywords: Cc:
Port: opencv

Description

Did a port install opencv and all appeared to go ok but when I went into python to test whether I could open the library I got:

Python 2.6.6 (r266:84292, Sep 21 2010, 00:14:50) 
[GCC 4.2.1 (Apple Inc. build 5659)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: dlopen(/Users/phoebebr/opencv/lib/cv.so, 2): Library not loaded: /opt/local/lib/libx264.93.dylib
  Referenced from: /Users/phoebebr/opencv/lib/libopencv_highgui.2.1.dylib
  Reason: image not found
>>>

then did a port install ffmpeg (just to be sure) and found these files appeared to be in the wrong place, so moved them:

sudo  cp /opt/local/var/macports/software/x264/20100412_0/opt/local/lib/* /opt/local/lib

However, I still get an error:

Python 2.6.6 (r266:84292, Sep 21 2010, 00:14:50) 
[GCC 4.2.1 (Apple Inc. build 5659)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: dlopen(/Users/phoebebr/opencv/lib/cv.so, 2): Symbol not found: _x264_encoder_open_98
  Referenced from: /opt/local/lib/libavcodec.dylib
  Expected in: /opt/local/lib/libx264.93.dylib
 in /opt/local/lib/libavcodec.dylib
>>> 

Bit of a newbie to this so not sure if I'm missing something obvious?

Change History (3)

comment:1 Changed 14 years ago by jmroot (Joshua Root)

Owner: changed from macports-tickets@… to stante@…

Please remember to cc the maintainer.

comment:2 Changed 14 years ago by phoebebright@…

Thanks.

comment:3 Changed 14 years ago by mf2k (Frank Schima)

Resolution: worksforme
Status: newclosed

Works for me. I'm assuming you did not have a python variant installed.

Note: See TracTickets for help on using tickets.