[Spambayes] Spambayes can't find bsddb
Rick Gregory
rick at drinknow.net
Sat Mar 27 14:49:25 EST 2004
Ah.....
You nailed the OS X issue. Thanks.
On my Linux box I switched to pickle for now, but I'll rebuild Python -
I think I did install the Berkeley db after building Python.
Thanks!
Skip Montanaro wrote:
> Rick> When I run sb_imapfilter on my Powerbook (OS X 10.3.3, Python 2.3)
> Rick> I get:
>
> Rick> ImportError: No module named _bsddb
> Rick> Exception exceptions.AttributeError: "'MessageInfoDB' object has no
> Rick> attribute 'db'" in <bound method MessageInfoDB.__del__ of
> Rick> <spambayes.message.MessageInfoDB object at 0x4e7d30>> ignored
>
>On your Mac OSX box does your Python installation have a _bsddb.so file in
>the lib-dynload directory? If not, it's probably because whatever Berkeley
>DB is installed is not recent enough so the Python build process refused to
>build it. The version which comes in /usr/lib is the old 1.85 version. On
>my system I get it from the Fink project. If you do have a
>lib-dynload/_bsddb.so file, was does otool tell you about its library
>dependencies?
>
> % otool -L /Users/skip/local/lib/python2.4/lib-dynload/_bsddb.so
> /Users/skip/local/lib/python2.4/lib-dynload/_bsddb.so:
> /sw/lib/libdb-3.3.dylib (compatibility version 3.3.0, current version 3.3.11)
> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 63.0.0)
>
>
> Rick> You do not have a dbm module available to use. You need to
> Rick> either use a pickle (see the FAQ), use Python 2.3 (or above),
> Rick> or install a dbm module such as bsddb (see
> Rick> http://sf.net/projects/pybsddb).
>
> Rick> Now, the sb FAQ asserts I should have all of this with Python 2.3,
> Rick> so I assume it's a pathing error. The problem is that I don't know
> Rick> that much about Python environment variables. What should I
> Rick> verify/set to ensure that bsddb is found?
>
> Rick> INcidentally, I manually installed Berkely db 4.2 and pysbddb on
> Rick> my linux box, so I know it's there.
>
>Did you maybe install it after installing Python? If so, rebuild/reinstall
>Python. The distutils stuff should notice the new Berkeley DB (probably
>installed in /usr/local/BerkeleyDB4.2).
>
>Skip
>
>
More information about the Spambayes
mailing list