Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

1.7K
Vistas
gobject-2.0-0 not able to load on macbook

I am facing this error when I start my flask python3 application on mac.

OSError: cannot load library 'gobject-2.0-0': dlopen(gobject-2.0-0, 2): image not found. Additionally, ctypes.util.find_library() did not manage to locate a library called 'gobject-2.0-0'

I am using weasyprint in my project which is causing this issue.

I tried to install glib and it is installed in my system

over 4 years ago · Santiago Trujillo
3 Respuestas
Responde la pregunta

0

I just managed the same issue on my Mac M1.

The problem was that symlinks to the libraries were not created (can't say should it be done by homebrew or weasyprint when installation).

So, I had to do it manually

sudo ln -s /opt/homebrew/opt/glib/lib/libgobject-2.0.0.dylib /usr/local/lib/gobject-2.0
sudo ln -s /opt/homebrew/opt/pango/lib/libpango-1.0.dylib /usr/local/lib/pango-1.0
sudo ln -s /opt/homebrew/opt/harfbuzz/lib/libharfbuzz.dylib /usr/local/lib/harfbuzz
sudo ln -s /opt/homebrew/opt/fontconfig/lib/libfontconfig.1.dylib /usr/local/lib/fontconfig-1
sudo ln -s /opt/homebrew/opt/pango/lib/libpangoft2-1.0.dylib /usr/local/lib/pangoft2-1.0

This solved the problem.

In order to TEST if Python can find the library you may run

from ctypes.util import find_library

find_library('gobject-2.0')  # Pass any other lib name as an argument
over 4 years ago · Santiago Trujillo Denunciar

0

If you installed weasyprint package in your virtual env but did not installed some required packages for that, then that might be the reason. It was actually, in my case.

If you're mac user you need install pango and libffi, not to mention python as well.

Installation guide on mac

brew install python pango libffi
(venv) pip install weasyprint
over 4 years ago · Santiago Trujillo Denunciar

0

I had the same issue after the homebrew update. Turned out the issue was because of the older pango lib version.

I did brew install pango

This upgraded pango lib from 1.48.2 -> 1.50.4 which internally installed gobject's latest version as dep. And my issue got resolved.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda