I’m encountering the following error when trying to use WeasyPrint in a Python project on my MacBook M2:
OSError: ctypes.util.find_library() did not manage to locate a library called 'libharfbuzz-0'
Here’s what I’ve done so far:
I installed harfbuzz using Homebrew: brew install harfbuzz
I confirmed that the library exists in the /opt/homebrew/Cellar/harfbuzz/10.1.0/lib/ directory, and the files are present, such as libharfbuzz.0.dylib
I tried copying the .dylib files to /usr/local/lib/, but the error still persists
I also checked the environment variables and the library path, but WeasyPrint is still unable to locate the required libharfbuzz library
Is there a specific configuration or environment variable that I need to set on macOS to make WeasyPrint work properly on a MacBook M2?