Reputation: 119
I installed opencv using brew and it seemed to install fine. I installed numpy, Scipy and Matplotlib with no problems. I run python and import these modules with no error. But opencv has been a real pain in the neck. I've spent hours try to get this to work.
Python 2.7.6 (v2.7.6:3a1db0d2747e, Nov 10 2013, 00:42:54)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import opencv
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named opencv
It almost seems like homebrew did not put the opencv module in the right directory.
Mike
Upvotes: 0
Views: 2708
Reputation: 39796
the module is not named opencv, but cv2, so :
>>> import cv2
>>> cv2.getBuildInformation()
[EDIT]
if you're trying to run something like this ,
then there's bad news for you. opencv comes with it's own python bindings since a very long time now, but apart from that, there exist several outdated 3rd party bindings. the code you're trying to run seems to use one of those, so you can't use it with opencv's builtin api.
Upvotes: 1