Help us understand the problem. What is going on with this article?

MacにOpenCVをインストールする方法

More than 3 years have passed since last update.

MacにOpenCVをインストールする方法で詰まったが、以下のサイトで解決したので忘備録のために書いておきます

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

このサイトを参考にしました。

まずはHomeBrewをインストールする必要あり。

http://brew.sh/index_ja.html

このサイトを参考にすること

HomeBrewをアップデートすること

brew update
brew install -v cmake

Tapもする必要がある

brew tap homebrew/science

OpenCVをHomebrewにてインストールする

brew install opencv

次に、パスを通す
以下のパスの通し方は古いやり方である

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

今使っているのはpython2.7なので、こう書き換える

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

そうして、pythonを起動して、テストすれば動くはずである

> 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
>>> 

間違っていたらコメント下さい

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした