Additionally, ctypes.util.find_library() did not manage to locate a library called 'gobject-2.0-0'
I am facing this error while using WeasyPrint in django application.
File "/usr/local/lib/python3.9/site-packages/cffi/api.py", line 827, in _load_backend_lib
raise OSError(msg)
OSError: cannot load library 'gobject-2.0-0': dlopen(gobject-2.0-0, 0x0002): tried: '/usr/local/lib/gobject-2.0-0' (no such file), 'gobject-2.0-0' (no such file), '/usr/local/lib/gobject-2.0-0' (no such file), '/usr/lib/gobject-2.0-0' (no such file), '/Users/sajeel/Projects/Tobit/mietoase/gobject-2.0-0' (no such file). Additionally, ctypes.util.find_library() did not manage to locate a library called 'gobject-2.0-0'
^C%
My laptop is:
Apple Macbook 2017 Pro 2.8 GHz Quad-Core Intel Core i7, with Monterrey OS
My requirements file is:
asgiref==3.4.1
certifi==2021.10.8
cffi==1.15.0
charset-normalizer==2.0.7
cryptography==35.0.0
defusedxml==0.7.1
Django==3.2.11
django-allauth==0.47.0
django-appconf==1.0.5
django-colorfield==0.4.5
django-crispy-forms==1.13.0
crispy-bootstrap5==0.6
django-debug-toolbar==3.2.2
django-extensions==3.1.5
django-filter==21.1
django-imagekit==4.1.0
django-simple-history==3.0.0
django-sortedm2m==3.1.1
djangorestframework==3.12.4
gunicorn==20.1.0
idna==3.3
Markdown==3.3.4
oauthlib==3.1.1
pilkit==2.0
Pillow==8.4.0
psycopg2-binary==2.9.1
pycparser==2.21
PyJWT==2.3.0
python3-openid==3.2.0
pytz==2021.3
random-username==1.0.2
reportlab==3.6.2
requests==2.26.0
requests-oauthlib==1.3.0
six==1.16.0
sqlparse==0.4.2
urllib3==1.26.7
Werkzeug==2.0.2
fontawesomefree==6.0.0-beta3
django-tinymce==3.4.0
django-weasyprint==2.1.0
django-tables2==2.4.1
My python version is: 3.9.13
Tried to reproduce this error on both Virtual Environment & Manual project.
Hi!
The paths tried don’t include Homebrew’s libraries, it means that you didn’t use Homebrew’s Python to create your virtual environment. Please follow the documentation to use WeasyPrint on macOS.
Hi!
The paths tried don’t include Homebrew’s libraries, it means that you didn’t use Homebrew’s Python to create your virtual environment. Please follow the documentation to use WeasyPrint on macOS.
It worked. Thanks