70% [* SPAM *] Re: shelve trying to import bsddb

DPalao dpalao.python at gmail.com
Wed Feb 16 08:59:25 EST 2011


El Wednesday February 16 2011, DPalao escribió:
> Dear all,
> I'm trying to use shelve to store some data, but sheve itself tries to
> import
> 
> bsddb, which results in:
> >   File "/usr/lib64/python2.6/shelve.py", line 239, in open
> >   
> >     return DbfilenameShelf(filename, flag, protocol, writeback)
> >   
> >   File "/usr/lib64/python2.6/shelve.py", line 223, in __init__
> >   
> >     Shelf.__init__(self, anydbm.open(filename, flag), protocol,
> >     writeback)
> >   
> >   File "/usr/lib64/python2.6/anydbm.py", line 82, in open
> >   
> >     mod = __import__(result)
> >   
> >   File "/usr/lib64/python2.6/dbhash.py", line 8, in <module>
> >   
> >     import bsddb
> > 
> > ImportError: No module named bsddb
> 
> I know that the new bsddb3 should be used, so what can I do?
> TIA,
> 
> D

I solved the issue. I just compiled python (btw, I'm using 2.6.6) with support 
for "berkdb", which apparently disappeared in a recent update (I'm using 
gentoo).




More information about the Python-list mailing list