Skip to content

Commit 9479feb

Browse files
authored
docs: add explicit instructions for installing pkg-config and cairo as required by pycairo for macos (#4146)
1 parent d85ddb0 commit 9479feb

File tree

1 file changed

+49
-2
lines changed
  • docs/source/installation

1 file changed

+49
-2
lines changed

docs/source/installation/uv.md

+49-2
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ the instructions below.
143143

144144
::::::{tab-set}
145145

146-
:::::{tab-item} MacOS & Windows
146+
:::::{tab-item} Windows
147147
The following commands will
148148

149149
- create a new directory for a Python project,
@@ -163,8 +163,55 @@ Manim is now installed in your local project environment!
163163

164164
:::::
165165

166+
:::::{tab-item} MacOS
167+
Before we can install Manim, we need to make sure that the system utilities
168+
`cairo` and `pkg-config` are present. They are needed for the [`pycairo` Python
169+
package](https://pycairo.readthedocs.io/en/latest/), a dependency of Manim.
170+
171+
The easiest way of installing these utilities is by using [Homebrew](https://brew.sh/),
172+
a fairly popular 3rd party package manager for MacOS. Check whether Homebrew is
173+
already installed by running
174+
175+
```bash
176+
brew --version
177+
```
178+
179+
which will report something along the lines of `Homebrew 4.4.15-54-...`
180+
if it is installed, and a message `command not found: brew` otherwise. In this
181+
case, use the shell installer [as instructed on Homebrew's website](https://brew.sh/),
182+
or get a `.pkg`-installer from
183+
[their GitHub release page](https://github.com/Homebrew/brew/releases). Make sure to
184+
follow the instructions of the installer carefully, especially when prompted to
185+
modify your `.zprofile` to add Homebrew to your system's PATH.
186+
187+
With Homebrew available, the required utilities can be installed by running
188+
189+
```bash
190+
brew install cairo pkg-config
191+
```
192+
193+
With all of this preparation out of the way, now it is time to actually install
194+
Manim itself! The following commands will
195+
196+
- create a new directory for a Python project,
197+
- and add Manim as a dependency, which installs it into the corresponding
198+
local Python environment.
199+
200+
The name for the Python project is *manimations*, which you can change
201+
to anything you like.
202+
203+
```bash
204+
uv init manimations
205+
cd manimations
206+
uv add manim
207+
```
208+
209+
Manim is now installed in your local project environment!
210+
211+
:::::
212+
166213
:::::{tab-item} Linux
167-
Practically, the instructions given in the *MacOS & Windows* tab
214+
Practically, the instructions given in the *Windows* tab
168215
also apply for Linux -- however, some additional dependencies are
169216
required as Linux users need to build
170217
[ManimPango](https://github.com/ManimCommunity/ManimPango)

0 commit comments

Comments
 (0)