473,479 Members | 2,085 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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.py", 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.python
Traceback (most recent call last):
File "gconf.test.python", 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.so
# 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.python", 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_IFDIR|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_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|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\3 10;\0\0004\0\0\0\274\277\2\0\0\0\0\0004\0
\0\3\0(\0\"\0\37\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\227\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\20\1\0\0\6\0\0\0\4\0\0\0\305\0\0\0\3 13\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\00 03\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_IFREG|0755, st_size=182087, ...}) = 0
old_mmap(NULL, 43304, PROT_READ|PROT_EXEC, MAP_PRIVATE, 4, 0) = 0x4040c000
mprotect(0x40415000, 6440, PROT_NONE) = 0
old_mmap(0x40415000, 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
http://bsd.reedmedia.net/
Jul 18 '05 #1
1 4211
> Traceback (most recent call last):
File "gconf.test.python", line 16, in ?
import gnome.gconf
ImportError: No module named gconf


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_invoke".

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
http://bsd.reedmedia.net/
Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1563
by: Juergen R. Plasser | last post by:
Hi, I have installed libxml2-2.5.7, libxslt-1.0.30 from source and the bindings libxml2-python-2.5.7. Everything seems to compile fine, but when I try to import the libxml2 library in python...
1
1863
by: Brian Donovan | last post by:
Hi All, I'm trying to get xpath to work with the libxml2 python bindings. I'm using the following doc = libxml2.parseFile(filename) result = doc.xpathEval('//*') My test XML file has 10...
4
2192
by: Phil Thompson | last post by:
Riverbank Computing is pleased to announce the release of PyQt v3.14 available from http://www.riverbankcomputing.co.uk/. Changes since the last release include support for QScintilla v1.5. ...
1
2918
by: Arthur Chereau | last post by:
Hi, I'm trying to setup viewcvs to work with subversion 1.2.0 on Linux with Python 2.4.1. The last viewcvs (from CVS) needs subversion python bindings. I installed swig and built subversion from...
0
1212
by: Roland Hedberg | last post by:
Hi! This involves quite a lot of different system, so I'm not really sure who which would be the right list to query. So, I'm trying a couple, this list being one of them. I'm trying to...
1
1598
by: manatlan | last post by:
Just a post to announce some python bindings for picasaweb (photo's service of google). ---PycasaWeb (GPL), http://manatlan.infogami.com/pycasaweb I think it may be usefull for linux users,...
0
1803
by: LaundroMat | last post by:
Hi, Has anyone succeeded in compiling the vlc-python bindings on Windows? (as discussed in the vlc development wiki). I have found several compiled bindings, but none were updated for Python...
2
2020
by: riklaunim | last post by:
There is pySVN for subversion but does other revision control system systems have some good python bindings/apis ? with good docs and some examples.
0
1220
by: Matteo Bertini | last post by:
#### PyQt3Support - Python bindings for Qt3Support #### http://www.develer.com/oss/PyQt3Support #### What is this? PyQt3Support is an extension to PyQt4 that adds bindings to Qt's...
0
7027
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6899
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7019
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6719
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5312
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4757
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
2980
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
2970
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
555
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.