I'm trying to open a .db file that is of type db.gnu. Attempting to open it with the built-in Python 3 module dbm fails with the message:
dbm.error: db type is dbm.gnu, but the module is not available
I understand that I have to use the gnu submodule in dbm to open this. However, I am unable to do so in Python 3.6.3 on macOS:
In [1]: import dbm
In [2]: dbm.gnu
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-2-ddbd370a1085> in <module>()
----> 1 dbm.gnu
AttributeError: module 'dbm' has no attribute 'gnu'
How can I use dbm.gnu on a Mac?