Categories: Tips

Install OpenCV for python in OSX Mavericks 10.9


#Assuming that you have installed Xcode, Command Line Tools, CMake, and Python

#Install ScipySuperpack

~$ curl https://raw.github.com/fonnesbeck/ScipySuperpack/master/install_superpack.sh > install_superpack.sh

~$ sh install_superpack.sh

#Download OpenCV 2.4.2

#Extract OpenCV-2.4.2.tar.bz2

#Open Terminal at the extracted directory

#At OpenCV-2.4.2 directory:

~$ echo "#define GTEST_USE_OWN_TR1_TUPLE 1" | cat > temp1

~$ cat modules/ts/include/opencv2/ts/ts_gtest.h > temp2

~$ cat temp1 temp2 > modules/ts/include/opencv2/ts/ts_gtest.h

~$ mkdir build

~$ cd build

~$ cmake .. -Wno-dev

~$ make -j8 && sudo make install

#Update your bash_profile:

~$ echo "export PYTHONPATH=/usr/local/lib/python2.7/site-packages/:$PYTHONPATH" >> ~/.bash_profile

#Close and open the Terminal

#Open python console and try to import cv2 to test if everything works

~$ python import cv2

Mithun

Share
Published by
Mithun

Recent Posts

Quick release mount systems Compatibility chart

Plate Base FALCAM F38 Ulanzi Uka PGYTECH SNAPLOCK PeakDesign Falcam F38 ⬤ ✕ ✕ ✕…

7 months ago

Happy New Year 2025

I really thought I would keep up with the blog in 2024. But, it didn't…

8 months ago

Happy New Year 2024

Oh boy, there were a lot of things that happened this year. Like last year,…

2 years ago

Happy New Year 2023

This has become a abandoned blog. I will try to fix things this year. More…

3 years ago

Happy New Year 2022

Let me start off by saying, i have more blog posts this year than the…

4 years ago

Fix for xbox “This App Needs a Few Things That Are Missing on this PC”

This happened because your windows has run out of space. If you get this error…

4 years ago

This website uses cookies.