Skip to content

Commit 2bd7fc1

Browse files
committed
update: usage docs updated for macos
1 parent 2b3cbb4 commit 2bd7fc1

1 file changed

Lines changed: 55 additions & 18 deletions

File tree

docs/usage.md

Lines changed: 55 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,25 @@
11
# installation guide
22

3-
how to install prebuilt dlib wheels for linux.
3+
how to install prebuilt dlib wheels for linux and macOS.
44

55
## quick install
66

7-
### direct download from repo
7+
### macOS direct install
8+
9+
```bash
10+
# automated installer (recommended)
11+
curl -sSL https://raw.githubusercontent.com/EqualByte/Dlib_linux_python_3.x/main/scripts/install_wheel_macos.sh | bash
12+
13+
# or manual install for Intel Mac (x86_64)
14+
wget https://github.com/EqualByte/Dlib_linux_python_3.x/releases/download/v19.24/dlib-19.24-cp312-cp312-macosx_10_9_x86_64.whl
15+
pip install dlib-19.24-cp312-cp312-macosx_10_9_x86_64.whl
16+
17+
# or for Apple Silicon (arm64)
18+
wget https://github.com/EqualByte/Dlib_linux_python_3.x/releases/download/v19.24/dlib-19.24-cp312-cp312-macosx_11_0_arm64.whl
19+
pip install dlib-19.24-cp312-cp312-macosx_11_0_arm64.whl
20+
```
21+
22+
### linux direct install
823

924
grab the python 3.12 wheel directly from the repo:
1025

@@ -16,9 +31,9 @@ pip install dlib-19.24-cp312-cp312-linux_x86_64.whl
1631
# aarch64
1732
wget https://raw.githubusercontent.com/EqualByte/Dlib_linux_python_3.x/main/dlib-19.24-cp312-cp312-linux_aarch64.whl
1833
pip install dlib-19.24-cp312-cp312-linux_aarch64.whl
19-
````
34+
```
2035

21-
### installation script
36+
### installation script (linux)
2237

2338
use the automated installer:
2439

@@ -37,15 +52,29 @@ pip install https://github.com/EqualByte/Dlib_linux_python_3.x/releases/download
3752

3853
## supported platforms
3954

40-
| architecture | python versions | os |
41-
| ------------ | --------------- | ----- |
42-
| x86_64 | 3.11 - 3.14 | linux |
43-
| aarch64 | 3.11 - 3.14 | linux |
55+
| OS | Architecture | Python Versions | Notes |
56+
| ----- | --------------------- | --------------- | --------------------------- |
57+
| Linux | x86_64 | 3.11 - 3.14 | manylinux2014 compatible |
58+
| Linux | aarch64 | 3.11 - 3.14 | manylinux2014 compatible |
59+
| macOS | x86_64 (Intel) | 3.10 - 3.13 | macOS 10.9+ |
60+
| macOS | arm64 (Apple Silicon) | 3.10 - 3.13 | macOS 11.0+, self-contained |
4461

4562
## system requirements
4663

4764
make sure your system has the necessary dependencies.
4865

66+
### macOS
67+
68+
```bash
69+
# install homebrew if needed
70+
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
71+
72+
# install dependencies (optional - wheels are self-contained)
73+
brew install cmake boost openblas
74+
```
75+
76+
**Note:** macOS wheels include bundled dependencies, so additional installations are usually not required.
77+
4978
### ubuntu/debian
5079

5180
```bash
@@ -84,21 +113,29 @@ print("dlib installed successfully")
84113

85114
## troubleshooting
86115

87-
* **import errors**: make sure system dependencies are installed, reinstall wheel if needed
88-
* **architecture mismatch**: check `uname -m` and download correct wheel
89-
* **python version mismatch**: check `python --version` matches the wheel
116+
- **import errors**: make sure system dependencies are installed, reinstall wheel if needed
117+
- **architecture mismatch**:
118+
- Linux: check `uname -m` (x86_64 or aarch64)
119+
- macOS: check `uname -m` (x86_64 for Intel, arm64 for Apple Silicon)
120+
- Download the correct wheel for your architecture
121+
- **python version mismatch**: check `python --version` matches the wheel (cp310, cp311, cp312, cp313)
122+
- **platform mismatch**:
123+
- macOS wheels have `macosx_*` in the filename
124+
- Linux wheels have `linux_*` or `manylinux_*` in the filename
125+
- Don't try to install a Linux wheel on macOS or vice versa
90126

91127
common errors:
92128

93-
* `no module named 'dlib'`: install system dependencies first
94-
* `importerror: libboost_python`: install boost development libraries
95-
* `undefined symbol`: wrong architecture, download correct wheel
129+
- `no module named 'dlib'`: install system dependencies first (Linux only)
130+
- `importerror: libboost_python`: install boost development libraries (Linux only)
131+
- `undefined symbol`: wrong architecture, download correct wheel
132+
- `is not a supported wheel on this platform`: downloaded wrong OS/architecture wheel
96133

97134
## examples
98135

99136
see `examples/` for working demos:
100137

101-
* `basic_face_detection.py` - simple face detection example
138+
- `basic_face_detection.py` - simple face detection example
102139

103140
## build from source
104141

@@ -114,6 +151,6 @@ python setup.py install
114151

115152
## support
116153

117-
* issues: [github issues](https://github.com/EqualByte/Dlib_linux_python_3.x/issues)
118-
* documentation: [dlib.net](http://dlib.net/)
119-
* original repo: [davisking/dlib](https://github.com/davisking/dlib)
154+
- issues: [github issues](https://github.com/EqualByte/Dlib_linux_python_3.x/issues)
155+
- documentation: [dlib.net](http://dlib.net/)
156+
- original repo: [davisking/dlib](https://github.com/davisking/dlib)

0 commit comments

Comments
 (0)