The python bindings for gconf (gnome-python2-gconf) could not be found.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jeremy C. Reed

    The python bindings for gconf (gnome-python2-gconf) could not be found.

    Configuring gramps (genealogy software) says:

    checking Python bindings for gtk... ok
    checking Python bindings for GNOME... ok
    checking Python bindings for gconf... Traceback (most recent call last):
    File "conftest.p y", line 17, in ?
    import gnome.gconf
    ImportError: No module named gconf
    cat: conftest.out: No such file or directory
    configure: error:
    **** The python bindings for gconf (gnome-python2-gconf) could not be found.
    *** Error code 1


    I am able to repeat it with this simple python script (based on the
    configure code):

    -=-=-=-
    try:
    import pygtk
    pygtk.require(' 2.0')
    except ImportError:
    pass

    def out(str):
    f = open('conftest. out', 'w')
    f.write(str)
    f.close()

    try:
    import gconf
    out("YES")
    except ImportError:
    import gnome.gconf
    out("YES")
    except ImportError:
    out("NO")
    -=-=-=-

    For example:

    $ python gconf.test.pyth on
    Traceback (most recent call last):
    File "gconf.test.pyt hon", line 16, in ?
    import gnome.gconf
    ImportError: No module named gconf

    I have gnome-python-2.0.0 installed. I installed using pkgsrc build system
    and it did not work. And I installed directly from source too.

    I assume I have the gconf module installed. How can I find out?

    I have:

    -rw-r--r-- 1 root root 296026 Mar 17 05:30
    /usr/lib/python2p3/site-packages/gtk-2.0/gconf.a
    -rwxr-xr-x 1 root root 1114 Mar 17 06:08
    /usr/lib/python2p3/site-packages/gtk-2.0/gconf.la
    -rwxr-xr-x 1 root root 182087 Mar 17 06:08
    /usr/lib/python2p3/site-packages/gtk-2.0/gconf.so
    -rw-r--r-- 1 root root 29603 Mar 17 06:08
    /usr/share/pygtk/2.0/defs/gconf.defs


    How can I get python to tell me what it is doing when it looks for
    and tries the module?

    I have built and installed this several times before. Just the past few
    days something has changed in my python setup or in my gnome-python.

    My python is:
    $ python -V
    Python 2p3.3

    It is as installed using pkgsrc under Linux. (The package name is
    python23-pth-2.3.3nb1.)

    When I run python with debugging and verbose I get:

    # trying /usr/lib/python2p3/glob.py
    # /usr/lib/python2p3/glob.pyc matches /usr/lib/python2p3/glob.py
    import glob # precompiled from /usr/lib/python2p3/glob.pyc
    # trying /usr/lib/python2p3/site-packages/gtk-2.0/gconf.so
    import gnome # directory /usr/lib/python2p3/site-packages/gtk-2.0/gnome
    # trying /usr/lib/python2p3/site-packages/gtk-2.0/gnome/__init__.so
    # trying /usr/lib/python2p3/site-packages/gtk-2.0/gnome/__init__module. so
    # trying /usr/lib/python2p3/site-packages/gtk-2.0/gnome/__init__.py
    # /usr/lib/python2p3/site-packages/gtk-2.0/gnome/__init__.pyc matches
    /usr/lib/python2p3/site-packages/gtk-2.0/gnome/__init__.py
    import gnome # precompiled from /usr/lib/python2p3/site-packages/gtk-2.0/gnome/__init__.pyc
    # trying /usr/lib/python2p3/site-packages/gtk-2.0/gnome/ltihooks.so
    # trying /usr/lib/python2p3/site-packages/gtk-2.0/gnome/ltihooksmodule. so
    # trying /usr/lib/python2p3/site-packages/gtk-2.0/gnome/ltihooks.py
    # trying /usr/lib/python2p3/site-packages/gtk-2.0/gnome/ltihooks.pyc
    # trying /usr/lib/python2p3/site-packages/gtk-2.0/ltihooks.so
    # trying /usr/lib/python2p3/site-packages/gtk-2.0/ltihooksmodule. so
    # trying /usr/lib/python2p3/site-packages/gtk-2.0/ltihooks.py
    # trying /usr/lib/python2p3/site-packages/gtk-2.0/ltihooks.pyc
    # trying /usr/pkgsrc/databases/gramps/ltihooks.so
    # trying /usr/pkgsrc/databases/gramps/ltihooksmodule. so
    # trying /usr/pkgsrc/databases/gramps/ltihooks.py
    ....
    # trying /usr/lib/python2p3/site-packages/PIL/ltihooks.so
    # trying /usr/lib/python2p3/site-packages/PIL/ltihooksmodule. so
    # trying /usr/lib/python2p3/site-packages/PIL/ltihooks.py
    # trying /usr/lib/python2p3/site-packages/PIL/ltihooks.pyc
    # trying /usr/lib/python2p3/site-packages/gtk-2.0/gnome/gobject.so
    # trying /usr/lib/python2p3/site-packages/gtk-2.0/gnome/gobjectmodule.s o
    # trying /usr/lib/python2p3/site-packages/gtk-2.0/gnome/gobject.py
    # trying /usr/lib/python2p3/site-packages/gtk-2.0/gnome/gobject.pyc
    # trying /usr/lib/python2p3/site-packages/gtk-2.0/gobject.so
    import gobject # dynamically loaded from /usr/lib/python2p3/site-packages/gtk-2.0/gobject.so
    # trying /usr/lib/python2p3/site-packages/gtk-2.0/gnome/_gnome.so
    # trying /usr/lib/python2p3/site-packages/gtk-2.0/gnome/gconf.so
    # trying /usr/lib/python2p3/site-packages/gtk-2.0/gnome/gconfmodule.so
    # trying /usr/lib/python2p3/site-packages/gtk-2.0/gnome/gconf.py
    # trying /usr/lib/python2p3/site-packages/gtk-2.0/gnome/gconf.pyc
    dlopen("/usr/lib/python2p3/lib-dynload/strop.so", 2);
    dlopen("/usr/lib/python2p3/site-packages/gtk-2.0/gconf.so", 2);
    dlopen("/usr/lib/python2p3/site-packages/gtk-2.0/gobject.so", 2);
    dlopen("/usr/lib/python2p3/site-packages/gtk-2.0/gnome/_gnome.so", 2);
    Traceback (most recent call last):
    File "gconf.test.pyt hon", line 16, in ?
    import gnome.gconf
    ImportError: No module named gconf
    # clear __builtin__._
    # clear sys.path
    # clear sys.argv
    ....


    strace tells me:

    getdents64(3, /* 108 entries */, 4096) = 4096
    getdents64(3, /* 96 entries */, 4096) = 3768
    getdents64(3, /* 0 entries */, 4096) = 0
    close(3) = 0
    stat64("/usr/lib/python2p3/site-packages/gtk-2.0", {st_mode=S_IFDI R|0755, st_size=4096,
    ....}) = 0
    stat64("/usr/lib/python2p3/site-packages/gtk-2.0/gconf", 0xbfffef40) = -1 ENOENT (No such
    file or directory)
    write(2, "# trying /usr/lib/python2p3/site-packages/gtk-2.0/gconf.so\n", 59# trying
    /usr/lib/python2p3/site-packages/gtk-2.0/gconf.so
    ) = 59
    open("/usr/lib/python2p3/site-packages/gtk-2.0/gconf.so", O_RDONLY|O_LARG EFILE) = 3
    fstat64(3, {st_mode=S_IFRE G|0755, st_size=182087, ...}) = 0
    open("/usr/lib/python2p3/site-packages/gtk-2.0/gconf.so", O_RDONLY) = 4
    read(4,
    "\177ELF\1\1\1\ 0\0\0\0\0\0\0\0 \0\3\0\3\0\1\0\ 0\0\310;\0\0004 \0\0\0\274\277\ 2\0\0\0\0\0004\ 0
    \0\3\0(\0\"\0\3 7\0\1\0\0\0\0\0 \0\0\0\0\0\0\0\ 0\0\0\300\207\0 \0\300\207\0\0\ 5\0\0\0\0\20\0\ 0\1\0\0\0\
    300\207\0\0\300 \227\0\0\300\22 7\0\0D\21\0\0h\ 21\0\0\6\0\0\0\ 0\20\0\0\2\0\0\ 0$\225\0\0$\245 \0\0$\245
    \0\0\20\1\0\0\2 0\1\0\0\6\0\0\0 \4\0\0\0\305\0\ 0\0\313\0\0\0\0 \0\0\0C\0\0\0\0 \0\0\0\272\0\0\ 0\0\0\0\0
    \0\0\0\0U\0\0\0 \0\0\0\0\273\0\ 0\0\0\0\0\0\0\0 \0\0003\0\0\0\0 \0\0\0\257\0\0\ 0\0\0\0\0[\0\0\0\0\0\0\0
    \243\0\0\0\0".. .,
    1024) = 1024
    fstat64(4, {st_mode=S_IFRE G|0755, st_size=182087, ...}) = 0
    old_mmap(NULL, 43304, PROT_READ|PROT_ EXEC, MAP_PRIVATE, 4, 0) = 0x4040c000
    mprotect(0x4041 5000, 6440, PROT_NONE) = 0
    old_mmap(0x4041 5000, 8192, PROT_READ|PROT_ WRITE, MAP_PRIVATE|MAP _FIXED, 4, 0x8000) =
    0x40415000
    close(4) = 0
    open("/usr/gcc3/lib/libgconf-2.so.5", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/usr/lib/libgconf-2.so.5", O_RDONLY) = 4


    /usr/lib/python2p3/site-packages/gtk-2.0/gconf.so does exist.
    How can I find out why it was skipped?

    $ ldd /usr/lib/python2p3/site-packages/gtk-2.0/gconf.so
    libgconf-2.so.5 => /usr/lib/libgconf-2.so.5 (0x4000c000)
    libORBit-2.so.0 => /usr/lib/libORBit-2.so.0 (0x40044000)
    libgobject-2.0.so.200 => /usr/lib/libgobject-2.0.so.200 (0x40080000)
    libgthread-2.0.so.200 => /usr/lib/libgthread-2.0.so.200 (0x400b7000)
    libm.so.6 => /lib/libm.so.6 (0x400c3000)
    libgmodule-2.0.so.200 => /usr/lib/libgmodule-2.0.so.200 (0x400e5000)
    libdl.so.2 => /lib/libdl.so.2 (0x400e9000)
    libglib-2.0.so.200 => /usr/lib/libglib-2.0.so.200 (0x400ec000)
    libc.so.6 => /lib/libc.so.6 (0x4015d000)
    libpthread.so.0 => /lib/libpthread.so.0 (0x40275000)
    liblinc.so.1 => /usr/lib/liblinc.so.1 (0x402c6000)
    libpopt.so.0 => /usr/lib/libpopt.so.0 (0x402ce000)
    /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)


    On a NetBSD system, it works and is slightly different:

    # trying /usr/pkg/lib/python2p3/glob.py
    # /usr/pkg/lib/python2p3/glob.pyc matches /usr/pkg/lib/python2p3/glob.py
    import glob # precompiled from /usr/pkg/lib/python2p3/glob.pyc
    # trying /usr/pkg/lib/python2p3/site-packages/gtk-2.0/gconf.so
    # trying /usr/pkg/lib/python2p3/site-packages/gtk-2.0/gobject.so
    import gobject # dynamically loaded from /usr/pkg/lib/python2p3/site-packages/gt
    k-2.0/gobject.so
    import gconf # dynamically loaded from /usr/pkg/lib/python2p3/site-packages/gtk-
    2.0/gconf.so
    # clear __builtin__._
    # clear sys.path
    # clear sys.argv


    I am not sure what information is needed to troubleshoot this.
    The python and other packages are installed using pkgsrc system.
    I am pretty sure the problem is how it was configured or built, but I am
    trying to track down where this has changed.

    Any advice on this would be appreciated.

    Thank you,

    Jeremy C. Reed

  • Jeremy C. Reed

    #2
    Re: The python bindings for gconf (gnome-python2-gconf) could not be found.

    > Traceback (most recent call last):[color=blue]
    > File "gconf.test.pyt hon", line 16, in ?
    > import gnome.gconf
    > ImportError: No module named gconf[/color]

    Just a followup for the archives. This issue was resolved.

    The problem was caused by a conflict with my ORBit2:
    "undefined symbol: ORBit_c_stub_in voke".

    I saw that by commenting out the gconf test in the configure
    script and running gramps.

    I reinstalled ORBit2 and related and the gnome-python2-gconf
    worked for gramps.

    I wish that the strace of "import gnome.gconf" would have
    shown this. (Later, I learned that maybe ltrace would have helped.)

    Jeremy C. Reed

    Comment

    Working...