For Mac users, you should first run the following additional command:
brew install cairo pango gdk-pixbuf libffiThen reactivate your virtual environment:
deactivate
source .venv/bin/activateRun:
export DYLD_FALLBACK_LIBRARY_PATH=/opt/homebrew/libThen test:
python -c "from weasyprint import HTML; print('OK')"Run:
export DYLD_FALLBACK_LIBRARY_PATH=/usr/local/libIf the previous step works, add the environment variable to your shell configuration. If you are using zsh, open:
nano ~/.zshrcAdd the following line:
export DYLD_FALLBACK_LIBRARY_PATH=/opt/homebrew/libexport DYLD_FALLBACK_LIBRARY_PATH=/usr/local/libSave the file, then run:
source ~/.zshrc