1 year ago
#252330
martin
cannot load library 'gobject-2.0-0':
I have this error comming when trying to run a python script on a mac with M1.
File "/Users/m/Desktop/workspace/project/venv/bin/weasyprint", line 5, in <module>
from weasyprint.__main__ import main
File "/Users/m/Desktop/workspace/project/venv/lib/python3.7/site-packages/weasyprint/__init__.py", line 325, in <module>
from .css import preprocess_stylesheet # noqa isort:skip
File "/Users/m/Desktop/workspace/project/venv/lib/python3.7/site-packages/weasyprint/css/__init__.py", line 27, in <module>
from . import computed_values, counters, media_queries
File "/Users/m/Desktop/workspace/project/venv/lib/python3.7/site-packages/weasyprint/css/computed_values.py", line 16, in <module>
from ..text.ffi import ffi, pango, units_to_double
File "/Users/m/Desktop/workspace/project/venv/lib/python3.7/site-packages/weasyprint/text/ffi.py", line 406, in <module>
'libgobject-2.0.so.0', 'libgobject-2.0.dylib', 'libgobject-2.0-0.dll')
File "/Users/m/Desktop/workspace/project/venv/lib/python3.7/site-packages/weasyprint/text/ffi.py", line 391, in _dlopen
return ffi.dlopen(names[0]) # pragma: no cover
File "/Users/m/Desktop/workspace/project/venv/lib/python3.7/site-packages/cffi/api.py", line 150, in dlopen
lib, function_cache = _make_ffi_library(self, name, flags)
File "/Users/m/Desktop/workspace/project/venv/lib/python3.7/site-packages/cffi/api.py", line 832, in _make_ffi_library
backendlib = _load_backend_lib(backend, libname, flags)
File "/Users/m/Desktop/workspace/project/venv/lib/python3.7/site-packages/cffi/api.py", line 827, in _load_backend_lib
raise OSError(msg)
OSError: cannot load library '/usr/local/lib/gobject-2.0-0': dlopen(/usr/local/lib/gobject-2.0-0, 0x0002): tried: '/opt/homebrew/Cellar/cairo/1.16.0_5/lib/gobject-2.0-0' (no such file), '/usr/local/lib/gobject-2.0-0' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/usr/lib/gobject-2.0-0' (no such file), '/opt/homebrew/Cellar/cairo/1.16.0_5/lib/libgobject-2.0.0.dylib' (no such file), '/opt/homebrew/Cellar/glib/2.70.4/lib/libgobject-2.0.0.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/usr/local/lib/libgobject-2.0.0.dylib' (no such file), '/usr/lib/libgobject-2.0.0.dylib' (no such file)
I have followed this post instructions (gobject-2.0-0 not able to load on macbook). The from command in my virtual environment finds the gobject-2.0.0 fine but the error still shows up. Any idea ?
python
macos
apple-m1
weasyprint
0 Answers
Your Answer