No module named '_gdbm'

Viewed 2013

I don't know much about python and I need help to install a python software.

I am using linux mint 12.8. Since I have tried many things I think I have several versions of python installed (3.5 and 3.7 I think...).

When I run setup.py install I get:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 7, in <module>
    import dbm.gnu as gdbm
  File "/home/zach/10_Soft/anaconda3/lib/python3.7/dbm/gnu.py", line 3, in <module>
    from _gdbm import *
ModuleNotFoundError: No module named '_gdbm'

I tried to install python3.5-gdbm (which appears to be up to date) and python3.7-gdbm (which is not found).

They both seem to be virtual packages of the same package python3-gdbm. I don't really know what to do with this information however...

Do you know what I should do?

1 Answers

There are some instructions here, but you have to mind the spaces as there the commands are poorly maintained. I was able to solve this issue as I had made a slight modification (changed 3.6 to 3.7) to this command:

sudo cp /usr/lib/python3.5/lib-dynload/_gdbm.cpython-35m-x86_64-linux-gnu.so /usr/lib/python3.7/lib-dynload/_gdbm.cpython-37m-x86_64-linux-gnu.so
Related