views:

62

answers:

3

using the MacPorts install of OpenCV does not seem to install the python bindings anywhere. Are they included, where do they go?

A: 

This should get installed in

/Library/Python/2.6/site-packages

if you use sudo port install ..

The directories 2.6, 2.5 .. will depend on python version on path.

Thanks Ned, Correcting the above - These are mac os x distribution.

Macports does put every thing under :

/opt/local/Library/Frameworks/Python.framework/Versions/Current/lib/python2.6/site-packages

pyfunc
Not likely. With a couple of exceptions, MacPorts goes to great lengths *not* to install anything anywhere other than under its own root, `/opt/local/` by default. The MacPorts python2.6 installs site-packages in its `/opt/local/Library/Frameworks/Python.framework` directory tree.
Ned Deily
A: 

Have you selected the +python26 variant for the MacPorts port?

$ sudo port install opencv +python26
Ned Deily
A: 

be sure to have py26-numpy installed to have support for basic functions such as cv.fromarray :

sudo port install py26-numpy

opencv will compile silently without numpy (it's not strictly a dependency).

sudo port install -v opencv +python26

there you can check that the binding to numpy is effective.

meduz