How to install dlib from source
1). download dlib-19.4
2).
cd examples/
mkdir build
cd build/
cmake -G Xcode ...
3). Install XQuartz-2.7.11.dmg from https://www.xquartz.org/, so X server is ready
4). cd Debug/ &
./face_landmark_detection_ex shape_predictor_68_face_landmarks.dat ../../faces/*.jpg
./dnn_face_recognition_ex ../../faces/bald_guys.jpg
Install Python bindings
Basically,
python3 setup.py install --yes USE_AVX_INSTRUCTIONS --no DLIB_USE_CUDA
This will build libdlib.a
and dlib.so
from
Build files have been written to: ./dlib-19.7/tools/python/
Build using cmake ...
Scanning dependencies of target dlib
[ 0%] Building CXX object dlib_build/CMakeFiles/dlib.dir/base64/base64_kernel_1.cpp.o
[ 1%] Building CXX object dlib_build/CMakeFiles/dlib.dir/bigint/bigint_kernel_1.cpp.o
[ 2%] Building CXX object dlib_build/CMakeFiles/dlib.dir/bigint/bigint_kernel_2.cpp.o
[ 3%] Building CXX object dlib_build/CMakeFiles/dlib.dir/bit_stream/bit_stream_kernel_1.cpp.o
[ 4%] Building CXX object dlib_build/CMakeFiles/dlib.dir/entropy_decoder/entropy_decoder_kernel_1.cpp.o
[ 5%] Building CXX object dlib_build/CMakeFiles/dlib.dir/entropy_decoder/entropy_decoder_kernel_2.cpp.o
[ 5%] Building CXX object dlib_build/CMakeFiles/dlib.dir/entropy_encoder/entropy_encoder_kernel_1.cpp.o
[ 6%] Building CXX object dlib_build/CMakeFiles/dlib.dir/entropy_encoder/entropy_encoder_kernel_2.cpp.o
[ 7%] Building CXX object dlib_build/CMakeFiles/dlib.dir/md5/md5_kernel_1.cpp.o
[ 8%] Building CXX object dlib_build/CMakeFiles/dlib.dir/tokenizer/tokenizer_kernel_1.cpp.o
Then Populating the distribution directory
./dlib-19.7/./dist/dlib
Install dlib HEAD (w/ python bindings) - MacPorts version
1). re-install Boost binding with Python 3.5
sudo port uninstall boost
port variants boost
sudo port install boost -python27 +python35
2). OpenCV 3.1 has been installed before, but updated automatically
opencv @3.1.0_3+contrib+python35
3). sudo /opt/local/bin/python3.5 setup.py install –yes USE_AVX_INSTRUCTIONS –no DLIB_USE_CUDA
4). run /opt/local/bin/python3.5
and type import dlib, error:
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/dlib-19.4.0-py3.5-macosx-10.11-x86_64.egg/dlib/__init__.py", line 1, in