LoginSignup
6
3

More than 5 years have passed since last update.

Python3でMacにdlibをpipしてもimportでエラーを吐く時の対処方

Posted at

dlibのインストール方法

基本的にはこの記事を参考にすれば良いですが,python3でインストールする方法を書きました.
Dlibの高性能な顔器官検出をMacでさくっと試す

boost
$ brew install boost
boost-python
$ brew install boost-python --with-python3
cmake
$ brew install cmake
$ pip install dlib

これでうまくいくと思いましたが,importする時に
以下の記事で紹介されているエラーが発生します.
import dlib ImportError Symbol not found: _PyClass_Type

そのためFinderで移動=>フォルダへ移動でフォルダの場所を/usr/local/opt/boost-python/lib/にします.
あとはlibboost_python3-mt.dylibとかをlibboost_python-mt.dylibに書き換えれば終了です!

お疲れ様でした.

6
3
0

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