Skip to main content

Posts

Showing posts from December, 2012

How to fix PyDev unresolved import for gi.repository in Eclipse

If you get unresolved imports in Eclipse when using GObject Introspection libraries (Gtk, Gdk, etc..) like below, try this. Right click on your PyDev project in eclipse and select Properties.  Select PyDev - Interpreter/Grammar  then click "Click here to configure an interpreter not listed." Select the Interpreter being used for the project and click the Forced Builtins tab.  Then click the New... button and add "gi" to the list.   Click apply and let Eclipse update itself.  Now start typing and eclipse will find the import and give you code hinting.  References: http://sourceforge.net/tracker/index.php?func=detail&aid=3316325&group_id=85796&atid=577329