Search code examples
pythongtkpygobject

Python GTK AttributeError: 'gi.repository.Gtk' object has no attribute 'FlowBox'


I am following Python GTK3+ Tutorial to make some applications on Ubuntu. However, when I try to execute sample code given for FLowBox, it results into following error:

AttributeError: 'gi.repository.Gtk' object has no attribute 'FlowBox'

I have GTK3 (v3.10.8) installed as well as Python 2.7.6 and Python 3.4.0.

I'm using Ubuntu 14.04

What should I do ?


Solution

  • GtkFlowBox was introduced in GTK+ 3.12. You will either need to: a) find a way to upgrade your GTK+ packages (there might be a PPA for that; check the Ubuntu GNOME team's Launchpad), b) upgrade to Ubuntu 14.10, or c) refer to an older version of the tutorial (I don't know how to find that).