質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
OpenCV

OpenCV(オープンソースコンピュータービジョン)は、1999年にインテルが開発・公開したオープンソースのコンピュータビジョン向けのクロスプラットフォームライブラリです。

MacOS(OSX)

MacOSとは、Appleの開発していたGUI(グラフィカルユーザーインターフェース)を採用したオペレーションシステム(OS)です。Macintoshと共に、市場に出てGUIの普及に大きく貢献しました。

Python

Pythonは、コードの読みやすさが特徴的なプログラミング言語の1つです。 強い型付け、動的型付けに対応しており、後方互換性がないバージョン2系とバージョン3系が使用されています。 商用製品の開発にも無料で使用でき、OSだけでなく仮想環境にも対応。Unicodeによる文字列操作をサポートしているため、日本語処理も標準で可能です。

Q&A

1回答

2545閲覧

Homebrew での OpenCV のインストール

退会済みユーザー

退会済みユーザー

総合スコア0

OpenCV

OpenCV(オープンソースコンピュータービジョン)は、1999年にインテルが開発・公開したオープンソースのコンピュータビジョン向けのクロスプラットフォームライブラリです。

MacOS(OSX)

MacOSとは、Appleの開発していたGUI(グラフィカルユーザーインターフェース)を採用したオペレーションシステム(OS)です。Macintoshと共に、市場に出てGUIの普及に大きく貢献しました。

Python

Pythonは、コードの読みやすさが特徴的なプログラミング言語の1つです。 強い型付け、動的型付けに対応しており、後方互換性がないバージョン2系とバージョン3系が使用されています。 商用製品の開発にも無料で使用でき、OSだけでなく仮想環境にも対応。Unicodeによる文字列操作をサポートしているため、日本語処理も標準で可能です。

0グッド

0クリップ

投稿2015/10/09 10:28

Homebrew で OpenCV をインストールし Python で動かしたいと考えています.

MacBook Air (11-inch,Mid 2013)
OS X El Capitan
Homebrew 0.9.5 (git revision 875e; last commit 2015-10-09)

まず Python を Homebrew でインストールしようとしましたが以下のように出てインストールができませんでした.

$ brew install python ==> Downloading https://www.python.org/ftp/python/2.7.10/Python-2.7.10.tgz Already downloaded: /Library/Caches/Homebrew/python-2.7.10.tgz ==> Downloading https://bugs.python.org/file30805/issue10910-workaround.txt Already downloaded: /Library/Caches/Homebrew/python--patch-c075353337f9ff3ccf8091693d278782fcdff62c113245d8de43c5c7acc57daf.txt ==> Downloading https://bugs.python.org/file40479/xcode-stubs-2.7.patch Already downloaded: /Library/Caches/Homebrew/python--patch-86714b750c887065952cd556f4d23246edf3124384f579356c8e377bc6ff2f83.patch ==> Patching patching file Include/pyport.h Hunk #1 succeeded at 713 (offset 14 lines). Hunk #2 succeeded at 736 (offset 14 lines). patching file Lib/distutils/ccompiler.py patching file Lib/distutils/unixccompiler.py ==> ./configure --prefix=/usr/local/Cellar/python/2.7.10_2 --enable-ipv6 --datar Last 15 lines from /Users/io950/Library/Logs/Homebrew/python/01.configure: LDFLAGS=-isysroot MACOSX_DEPLOYMENT_TARGET=10.11 checking build system type... x86_64-apple-darwin15.0.0 checking host system type... x86_64-apple-darwin15.0.0 checking for --enable-universalsdk... no checking for --with-universal-archs... 32-bit checking MACHDEP... darwin checking EXTRAPLATDIR... $(PLATMACDIRS) checking for --without-gcc... yes checking for gcc... clang checking whether the C compiler works... no configure: error: in `/private/tmp/python20151009-16081-1idijpn/Python-2.7.10': configure: error: C compiler cannot create executables See `config.log' for more details READ THIS: https://git.io/brew-troubleshooting These open issues may also help: recommend python -m pip https://github.com/Homebrew/homebrew/pull/44667 gobject-introspection: depend on python https://github.com/Homebrew/homebrew/pull/44673 radare2: Fix Python install path https://github.com/Homebrew/homebrew/pull/43856 (WIP) ddar: fix python shebang location, add test, fix audit https://github.com/Homebrew/homebrew/pull/44695 Google App Engine (Python) `1.9.23` => `1.9.26` https://github.com/Homebrew/homebrew/pull/44452 Errors installing packages dependent on python when pyenv installed https://github.com/Homebrew/homebrew/issues/44747 python: Create `pdb` symlinks in the local `bin` directory https://github.com/Homebrew/homebrew/issues/44128 Fix python lib finding on OS X 10.10.4 https://github.com/Homebrew/homebrew/pull/42717 Python/Python3: Fix RuntimeError: tk.h version (8.6) doesn't match libtk.a version (8.5) https://github.com/Homebrew/homebrew/pull/41728 python's sys.prefix points to a version-specific framework path https://github.com/Homebrew/homebrew/issues/42236 bokken failed to build on OSX 10.10 due to Python 2.5 dependency https://github.com/Homebrew/homebrew/issues/32016

また OpenCV をインストールしようとすると以下のエラーが出てインストールできません.

$ brew install opencv ==> Installing opencv from homebrew/homebrew-science ==> Installing dependencies for homebrew/science/opencv: gcc, eigen, jpeg ==> Installing homebrew/science/opencv dependency: gcc ==> Downloading http://ftpmirror.gnu.org/gcc/gcc-5.2.0/gcc-5.2.0.tar.bz2 Already downloaded: /Library/Caches/Homebrew/gcc-5.2.0.tar.bz2 ==> Patching patching file gcc/jit/Make-lang.in patching file gcc/jit/jit-playback.c Hunk #1 succeeded at 2459 with fuzz 2 (offset 43 lines). ==> ../configure --build=x86_64-apple-darwin15.0.0 --prefix=/usr/local/Cellar/gc Last 15 lines from /Users/Leaf0115/Library/Logs/Homebrew/gcc/01.configure: checking for clang option to accept ISO C89... unsupported checking whether we are using the GNU C++ compiler... yes checking whether clang++ accepts -g... yes checking whether g++ accepts -static-libstdc++ -static-libgcc... no checking for gnatbind... no checking for gnatmake... no checking whether compiler driver understands Ada... no checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1 $$f2 checking for objdir... .libs checking for the correct version of gmp.h... yes checking for the correct version of mpfr.h... yes checking for the correct version of mpc.h... yes checking for the correct version of the gmp/mpfr/mpc libraries... yes checking for compatible ISL... no configure: error: Unable to find a usable ISL. See config.log for details. READ THIS: https://git.io/brew-troubleshooting These open issues may also help: freeimage: patches for gcc 5.0 https://github.com/Homebrew/homebrew/pull/44612 gcc can't find compatible ISL https://github.com/Homebrew/homebrew/issues/44444 isl 0.15, cloog 0.18.4, gcc compatibility patch https://github.com/Homebrew/homebrew/pull/44486 apple-gcc42 takes priority over modern gcc https://github.com/Homebrew/homebrew/issues/41055 gcc 4.9.2 fails to produce debugging information https://github.com/Homebrew/homebrew/issues/34976 Object files deleted during build of gcc needed by gdb https://github.com/Homebrew/homebrew/issues/35734 MacOS.(gcc|clang|llvm)_version can return nil https://github.com/Homebrew/homebrew/issues/18781

解決方法を調べましたが自力で解決することができなかったため質問を出させていただきました.
よろしくお願いします.

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

CommandLineToolsが入っていないか古いようですね。

以下のサイトを参考にして導入してみてください。
http://qiita.com/3yatsu/items/47470091277d46f3fde2

投稿2015/10/09 11:13

SKYYFISH

総合スコア654

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

退会済みユーザー

退会済みユーザー

2015/10/10 13:46

回答ありがとうございます! 無事 Python はインストールすることができました. ですが OpenCV のインストール時の make でエラーが発生してしまいます. ここを参考にしてみたのですがやはりエラーが発生してインストールできませんでした. https://github.com/Homebrew/homebrew-science/issues/951 ターミナルの出力をまとめたのでよければご教示ください. https://gist.github.com/io950/5929cae6e834915a707d
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだベストアンサーが選ばれていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問