Using gdk-pixbuf from mpkg
bletham at gmail.com
Sat Mar 12 15:52:34 PST 2016
I'm trying to run a simple Gtk3 PyGObject app which includes an image (and
so uses gdk-pixbuf). When I install py35-gobject3 and gtk3 through port I
can run the app just fine using macports python.
I want to be able to distribute this to other computers without having to
install xcode and macports, so I used macports to build mpkg's for
py35-gobject3 and gtk3. When I install these mpkg's on a computer without
macports, it seems that gdk-pixbuf isn't being set up correctly.
Running the app (with the python3.5 that was installed) complains that the
gdk-pixbuf installation is broken, and indeed the file
/opt/local/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache isn't created at all. I
create this file by running
sudo gdk-pixbuf-query-loaders --update-cache
but then I get a new error:
Glib.Error: gdk-pixbuf-error-quark: Couldn't recognize the image file
format for file 'icon.png' (3)
The actual python file I am running is:
from gi.repository import Gtk
win = Gtk.Window()
If I leave out the "win.set_icon_from_file('icon.png')" line, it works just
fine, it seems to be just gdk-pixbuf that isn't working.
This is osx 10.9, using the XQuartz terminal.
I tried separately installing an mpkg for just gdk-pixbuf2, but that didn't
Is this something that I should expect to work? Any ideas on how to debug
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the macports-users