Mac安装dlib环境

系统环境

  1. mac 系统:macOS Sierra 10.12
  2. python:Python 3.6.1

dlib安装前准备

  1. 安装numpy
pip3 install numpy
  1. 安装PIL
pip3 install Image
  1. 安装scipy
pip3 install scipy
  1. 安装matplotlib
pip3 install matplotlib

安装dlib

1. dlib的github上安装方法

image.png

2. Compiling dlib Python API

image.png

遇到的问题

image.png

解决方法:

brew install boost-python3
image.png

解决方法:

brew reinstall boost-python --with-python3
image.png

解决方法:

安装Mac的X11:X11是执行Unix程序的图形窗口环境。Mac OS X本身的程序是Aqua界面的,但是为了能够兼容unix和Linux移植过来的程序,需要x11窗口环境。
  运行dlib需要X11,但Mac目前没有自带X11,需要重新下载安装,下载地址,下载后直接安装,默认安装目录为/opt/X11,需要在/usr/loca/opt目录下创建软连接,创建命令如下,创建后重启Mac。

cd /usr/local/opt
ln -s /opt/X11 X11
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容