problems importing "bsddb"

Skip Montanaro skip at
Tue Aug 12 23:16:48 CEST 2003

    John> We are using OpenBSD latest release of Python (2.3),  and want to
    John> use the "bsddb" module.   Our python release has a directory
    John> called "bsddb",  but when we try and import it,   it says  
    >>> import bsddb
     Traceback (most recent call last):
       File "<stdin>", line 1, in ?
       File "/usr/local/lib/python2.3/bsddb/", line 40, in ?
         import _bsddb
     ImportError: No module named _bsddb

You need to install version 3 or 4 of Berkeley DB.  It may be available as
part of OpenBSD or as a port, but you can get the source from

and install it from source easily.  Once you've done that, rerun

    python install

in the Python source tree.


More information about the Python-list mailing list