cairo is the dependency for SVG support. However, when I installed it on macOS via brew, its Python library had difficulty finding it:

Probably due to SIP or some other reason I currently do now know, modifying DYLD or LD environment variables cannot do the trick. Now I had to link the dylib from opt to usr/local:
sudo ln -s /opt/homebrew/lib/libcairo.2.dylib /usr/local/lib/
I wonder if there is a better way to handle this on macOS 12.