There's no tutorial for a Mac OSX install. I have Python27+numpy+scipy installed in /Library/Frameworks/...
Will the method described at http://docs.opencv.org/doc/tutorials/introduction/linux_install/linux_install.html#linux-installation work on OSX to install opencv for me?
In particular, will sudo make install put opencv in /Library with the Python27... that Apple links to?
answered 2013-04-08 16:02:58 -0500Guanta
First of all: I don't use Mac but Linux (and partially Windows), so maybe it is different. But here is how it works under Linux and since MacOs and Linux are similar in many points (since MacOs is an early FreeBSD clone) it may also work for you (no guarantee here!). Ah and before you start now following my points: Have you checked if python is properly installed at all? Try to run
ipython (the interactive python shall). If that is not the case install python first properly! Okay now my linux-opencv-install-howto ;) :
ccmake ../, now you get a curse-interface, select the option to build Python (I think it's called build_opencv_python - or similar - I am currently not under linix...). If you have set your options (you can also select several others like optimization stuff and so on): hit
cfor configure, hit
cprobably again, until it disappears (if you get any errors you have to resolve them now), hit
gfor generate and quit.
make -j3(that calls the make-files with 3 threads to build opencv a little bit faster ;)
sudo make install(this installs opencv to the cmake-install-prefix-path, typically
/usr/local(maybe this is different under MacOS)
If you have installed Python properly beforehand everything should work fine now. If it doesn't work then try to set your PYTHONPATH (this is an environment variable) to the location where cv2.so is located. Look it up online how to set environment variables under MacOS (under linux it works by putting it in the .bashrc file like this:
export PYTHONPATH=$PYTHONPATH:/your/path/to/python/stuff). Good luck!
Asked: 2013-04-08 06:51:12 -0500
Seen: 261 times
Last updated: Apr 08 '13