Fixing ESPHome CairoSVG Error on macOS Homebrew Installation
If you use ESPHome on macOS installed via Homebrew and encounter an error like this:
Failed config
image: [source esp32-s3-box-3-5aac68 copy.yaml:152]
Please install the cairosvg python package to use this feature. (pip install cairosvg).
- file: mdi:volume-off
id: mute_icon
resize: 40x40
type: rgb
This issue is caused by the missing cairosvg
Python package in the ESPHome virtual environment used by Homebrew.
The Fix
To resolve this, install cairosvg
inside ESPHome’s virtual environment. Run the following command: