How to install OpenCV on Mac

I got stuck with the method of installing OpenCV on Mac, but I solved it at the following site, so I will write it as a memorandum

http://www.daveperrett.com/articles/2010/12/14/face-detection-with-osx-and-python/

I referred to this site.

First you need to install HomeBrew.

http://brew.sh/index_ja.html

Refer to this site

Updating HomeBrew

brew update
brew install -v cmake

You also need to tap

brew tap homebrew/science

Install OpenCV with Homebrew

brew install opencv

Then pass the path The following path is the old way

export PYTHONPATH="/usr/local/lib/python2.6/site-packages/:$PYTHONPATH"

I'm using python2.7 now, so rewrite it like this

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

Then launch python, test it and it should work

> python
Python 2.7.10 (v2.7.10:15c95b7d81dc, May 23 2015, 09:33:12) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv
>>> 

Please comment if you make a mistake

Recommended Posts

How to install OpenCV on Mac
How to install mysql-connector-python on mac
How to install drobertadams / toggl-cli on Mac
How to install OpenCV on Jetson Nano Python
[Python] How to install OpenCV on Anaconda [Windows]
Steps to install matplotlib on Mac
How to install graph-tool on macOS
How to install VMware-Tools on Linux
How to install pycrypto on Windows
How to install PyPy on CentOS
How to install TensorFlow on CentOS 7
How to install Maven on CentOS
Steps to install python3 on mac
How to install Go on Ubuntu
How to install music 21 on windows
How to install Theano on Mac OS X with homebrew
Install opencv on Mac using Anaconda Navigator
How to install aws-session-manager-plugin on Manajro Linux
[Kivy] How to install Kivy on Windows [Python]
How to erase Python 2.x on Mac.
How to install packages on Alpine Linux
How to install Anisble on Amazon Linux 2
How to install richzhang / colorization on Windows 10
How to install Apache (httpd) on CentOS7
How to install php7.4 on Linux (Ubuntu)
How to install Eclipse GlassFish 5.1.0 on CentOS 7
How to install Apache (httpd) on CentOS8
How to install NumPy on Raspberry Pi
How to install cx_Oracle on macOS Sierra
Install Tensorflow on Mac
Install pyenv on mac
How to install pip
How to install archlinux
Install Python on Mac
How to install python
Install Python 3 on Mac
How to install BayesOpt
How to install Nbextensions
Install Python 3.4 on Mac
Install Caffe on Mac
Install mecab on mac
How to install Prover9
Install mecab-python on Mac
How to install OpenCV on Cloud9 and run it in Python
How to install Theano on Mac OS X 10.10 (using pyenv, anaconda)
[2020 version] How to install Python3 on AWS EC2
How to quickly install h5py on Windows 10 [Unofficial]
How to install OpenGM on OSX with macports
How to install Camunda Modeler on Manjaro Linux
How to install / verify graphviz on anaconda / windows10
How to install Deep Learning framework Caffe on Mac in CPU mode
[2020.8 latest] How to install Python
How to install Python [Windows]
Install pygame on python3.4 on mac
Tabpy 1.0 (2020-01 version) How to install
Install module on Anaconda (Mac)
Install OpenPose on mac (Catalina)
How to register on pypi
Install numba on your Mac
Update python on Mac to 3.7-> 3.8
Install pandas 0.14 on python3.4 [on Mac]