3

the following code should work

import gi
import gi.repository

this works in a python shell. And it also works if I save the file as a script then launch it in a terminal. but in aptana3 i get this:

import gi.repository
ImportError: No module named repository

i think this bug report may have a clue

  • Ubuntu Natty Gnome3 32Bit
  • Pydev on python 2.7.1+
  • System on python 2.7.1+
gpoo
  • 8,408
  • 3
  • 38
  • 53
code shogan
  • 839
  • 2
  • 9
  • 25

1 Answers1

5

Goto

window > preferences > PyDev > Interpreter - (Python/Jython/IronPython).

Goto Forced Builtins tab

Click on New

add gi

Apply and then check.

Rahul Prasad
  • 8,074
  • 8
  • 43
  • 49