Sudar
Sudar

Reputation: 19982

Enable python support while installing opencv using mac ports

I installed opencv in my mac using mac ports by the following command

sudo port install opencv

It took around 2 hours and it installed properly. But the problem is that the python bindings are not enabled.

So please let me know how to install opencv in mac using ports and also enable the python bindings. Thanks

PS: I tried to manually compile opencv from source but I am getting lot of errors and I am not able to do it.

Upvotes: 2

Views: 1116

Answers (3)

meduz
meduz

Reputation: 4241

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.

Upvotes: 2

Sudar
Sudar

Reputation: 19982

I am still not able to compile opencv properly. At last, I found some pre-compiled dmg files from http://vislab.cs.vt.edu/~vislab/wiki/index.php?title=Vision which is working pretty decently.

Upvotes: 0

user221209
user221209

Reputation:

It's possible to compile opencv using cmake on macos (I'm actually doing this) but there is a problem with the videoWriter ...

Have a look there http://www.tsd.net.au/blog/opencv-python-bindings-macports

should be helpful.

Upvotes: 0

Related Questions