问题
I get unresolved imports for these,
from gi.repository import GLib, GObject, Gio
from gi.repository import Dee
from gi.repository import Unity
I've been learning to write lens for unity(ubuntu). Where/How to get these modules and link them?
回答1:
Are those in your PYTHONPATH? Have you tried adding 'gi' to the forced builtins? See: http://pydev.org/manual_101_interpreter.html for details.
回答2:
Right click on the project node and choose Properties
. Choose PyDev - PYTHONPATH
and the External Libraries
tab. Press Add source folder
and add the directory above the one that contains your gi
package. That is, if you have /src/gi/repository
you should add /src
.
来源:https://stackoverflow.com/questions/11098483/how-to-resolve-these-unresolved-imports-in-pydev-eclipse