prebuilt python wheels for dlib on linux and macOS. fast installs, zero drama.
dlib is a modern c++ toolkit with machine learning and computer vision tools. python bindings let you use it without touching c++.
- architectures: x86_64, aarch64
- python versions: 3.11 to 3.14
- architectures: x86_64 (Intel), arm64 (Apple Silicon)
- python versions: 3.10 to 3.13
- macOS versions: 10.9+ (Intel), 11.0+ (Apple Silicon)
download a wheel from releases and install with pip:
# python 3.11 x86_64
pip install dlib-19.24-cp311-cp311-linux_x86_64.whl
# python 3.12 aarch64
pip install dlib-19.24-cp312-cp312-linux_aarch64.whl
# python 3.13 x86_64
pip install dlib-19.24-cp313-cp313-linux_x86_64.whl# python 3.12 intel mac
pip install dlib-19.24-cp312-cp312-macosx_10_9_x86_64.whl
# python 3.12 apple silicon
pip install dlib-19.24-cp312-cp312-macosx_11_0_arm64.whlinstall directly from a release url:
pip install https://github.com/comethrusws/Dlib_linux_python_3.x/releases/download/manual-1/dlib-20.0.99-cp310-cp310-manylinux_2_39_x86_64.whlautomated installer (macOS):
curl -sSL https://raw.githubusercontent.com/comethrusws/Dlib_linux_python_3.x/main/scripts/install_wheel_macos.sh | bashinstall runtime deps before installing the wheel.
sudo apt-get update
sudo apt-get install -y \
libboost-all-dev libopenblas-dev liblapack-dev libx11-dev \
libgtk-3-dev libavcodec-dev libavformat-dev libswscale-dev \
libv4l-dev libxvidcore-dev libx264-dev libjpeg-dev libpng-dev \
libtiff-dev libatlas-base-devsudo yum install -y \
boost-devel openblas-devel lapack-devel libX11-devel gtk3-devel \
ffmpeg-devel libjpeg-turbo-devel libpng-devel libtiff-devel atlas-devel# install homebrew if not already installed
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# install dependencies (optional - wheels are self-contained)
brew install cmake boost openblasNote: macOS wheels are self-contained with bundled dependencies, so you may not need to install additional packages.
import dlib
print("dlib version:", dlib.__version__)
detector = dlib.get_frontal_face_detector()
print("dlib installed correctly")-
import errors: install runtime deps, then reinstall the wheel
-
arch mismatch: wheel must match your CPU architecture
# check your architecture uname -m # x86_64 = Intel Mac or Linux x86_64 # arm64 = Apple Silicon Mac # aarch64 = Linux ARM64
-
python mismatch: wheel must match
python --versionpython --version
-
macOS platform error: make sure you download the macOS wheel (macosx**), not linux wheel (linux*_ or manylinux__)
only needed if you require a custom build:
sudo apt-get install -y build-essential cmake libboost-all-dev
git clone https://github.com/davisking/dlib.git
cd dlib
python setup.py build
python setup.py installtag the repo, ci builds wheels for all supported python versions and both architectures, uploads artifacts, and attaches them to the release:
git tag v19.24
git push origin v19.24dlib is distributed under its original license. see the license here: https://github.com/davisking/dlib/blob/master/dlib/LICENSE.txt
- dlib repo: https://github.com/davisking/dlib
- docs: http://dlib.net/
- python examples: https://github.com/davisking/dlib/tree/master/python_examples