problems importing "bsddb"

Skip Montanaro skip at pobox.com
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/__init__.py", 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

    http://www.sleepycat.com/

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

    python setup.py install

in the Python source tree.

Skip





More information about the Python-list mailing list