There are many ways to do it and I have tried most of them but got only troubles. Only one worked for me. Lo and behold, here it is
For the record, I have Mac OS X 10.7.4
The recipe.
For the record, I have Mac OS X 10.7.4
The recipe.
- Install Xcode from apple app store then install command line tools from xcode preference
- Install macports from here http://www.macports.org/install.php
- Open terminal put the command: sudo port selfupdate
- Install python26 by: sudo port install python26
- then:
sudo port install py26-numpy
- (probably you don't need this step but I am recording it just because I have done it) then: sudo port install python_select
- then: sudo port -v install opencv +python26
- it will take several hours. and install opencv-2.4.3
- then: sudo port select python python26
- this will select the newly installed python as your default. Which is absolutely necessary
- note, that IDLE will not work at this point. But python + opencv will.
- now:
sudo port install py26-tkinter
- this will make idle work
- to check it, run python from terminal and put: import cv2
- this should work smoothly.
- do it step by step in the order stated in this recipe. Otherwise there is a high chance of falling in trouble.
- now do amazing projects :)
I have failed trying to use opencv-2.4.3 with python27. It simply does not work. If you don't want to take extra pain do it with python26 as I did. But If you really want to figure out how to use python27 check this link http://opencv.willowgarage.com/wiki/Mac_OS_X_OpenCV_Port
And please let me know how you made it work.
No comments:
Post a Comment