Skip to content Skip to sidebar Skip to footer

Trouble Installing Dlib For Python On Mac Osx 10.10

I'm trying to install dlib-18.16 for python on my computer (running Mac OSX 10.10). I have boost python installed as well as X11, but I've been running into trouble when running ./

Solution 1:

I realized that I had to go into the CMakeCache.txt file and manually change the X11 path from anaconda to usr/X11, as the anaconda versions of the X11 .h files were missing some of these XQuartz functions. Everything works now.

Solution 2:

I had this issue with the version in PyPi (19.4.0). Installing directly from source (19.4.99) seems to work.

So something between those two versions has resolved this.

Commands to install from source:

git clone https://github.com/davisking/dlib.git
cd dlib
pip install .

FYI, here are the Xlib.h files I have on my system as the presumption is it was picking up a different version of XLib.h which didn't have these symbols.

Running on OS-X 10.11.4 with Python 2.7. I definitely have XQuartz installed.

$ mdfind -name Xlib.h
/usr/local/Cellar/dlib/19.4/share/doc/dlib/docs/dlib/gui_core/xlib.h.html
/usr/local/Cellar/dlib/19.4/include/dlib/gui_core/xlib.h
/Users/<username>/Workspace/dlib/dlib/gui_core/xlib.h
/System/Library/Frameworks/Tk.framework/Versions/8.4/Headers/X11/Xlib.h
/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers/X11/Xlib.h
/opt/X11/include/X11/Xlib.h
/opt/X11/include/cairo/cairo-xlib.h
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Tk.framework/Versions/8.4/Headers/X11/Xlib.h
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers/X11/Xlib.h

Post a Comment for "Trouble Installing Dlib For Python On Mac Osx 10.10"