1
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

MacにCaffeをインストール

Last updated at Posted at 2017-04-06

MacにCaffeをインストールしようとして非常に手こずったのでメモとして残しておきます。
環境:OSX 10.11.1(El Captain) MacBook Pro 13inch, Early 2011(<-そろそろ買い換えないと。。)
CPUモードでのインストールのみです。

以下の記事を参考にさせていただきました。
http://qiita.com/Kajiyu/items/e8ad0ccd878328a21e8a
http://d.hatena.ne.jp/shu223/20160103/1452000295

上の記事を参考にインストールを進めました。
$ make runtest
までは問題なく進みましたが、
$ import caffe
でSegmentation fault: 11となりました。

記事②を参考に、Makefile.configを見直したが、直らず。
PYTHON_INCLUDE := /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/include/python2.7
/usr/local/lib/python2.7/site-packages/numpy/core/include/
PYTHON_LIB := /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib

$ cmake .
のログを見ると、
-- Python:
-- Interpreter : /usr/local/bin/python2.7 (ver. 2.7.11)
-- Libraries : /usr/lib/libpython2.7.dylib (ver 2.7.10)
となり、Makefile.configの設定が反映されていませんでした。

$ cmake . -DPYTHON_LIBRARY=/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib
とし、直接pathを指定することで、無事
$ import caffe
できるようになりました。

1
8
4

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?