Windows 64位中安装dlib真的很坑。

安装visual studio express 2012

cn_visual_studio_express_2012_for_windows_desktop_x86_dvd_1001987.iso

安装CMAKE

从http://cmake.org下载安装包,如:cmake-3.7.1-win64-x64.msi

编译Boost

下载boost 1.63.0并解压 https://ncu.dl.sourceforge.net/project/boost/boost/1.63.0/boost_1_63_0.zip

生成b2和bjam

SET PATH=%PATH%;C:\Python27;
cd C:\Users\jilili\Projects\boost_1_63_0\
bootstrap.bat

生成boost库

b2 -a --with-python address-model=64 toolset=msvc-11.0 runtime-link=static

安装dlib

请下载19.2版本,目前的master在Windows中安装有问题,Windows中没有LIBDIR,安装时会产生异常。

git clone https://github.com/davisking/dlib.git
git checkout v19.2

安装dlib

SET PATH=%PATH%;C:\Python27;C:\Program Files\CMake\bin;
SET BOOST_ROOT=C:\Users\jilili\Projects\boost_1_63_0
SET BOOST_LIBRARYDIR=C:\Users\jilili\Projects\boost_1_63_0\stage\lib
python setup.py install -G "Visual Studio 11 2012 Win64"

安装其他依赖

安装Numpy+MKL http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy

pip install numpy-1.11.3+mkl-cp27-cp27m-win_amd64.whl

安装Scipy http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy

pip install scipy-0.18.1-cp27-cp27m-win_amd64.whl

安装Scikit-image http://www.lfd.uci.edu/~gohlke/pythonlibs/#scikit-image

pip install scikit_image-0.12.3-cp27-cp27m-win_amd64.whl

[ 编辑 | 历史 ]
最近由“jilili”在“2017-01-13 03:54:56”修改