I’ve been using Conda for a few years as a convenient installation, mostly because I use Jupyter notebooks from time-to-time and it with all its dependencies installs with no problem.
At the moment, I’m working on a Python3 port of SpamBayes and am trying to fill in some missing modules. Gdbm is my current stumbling block:
% python
Python 3.9.13 (main, Aug 25 2022, 23:26:10)
[GCC 11.2.0] :: Anaconda, Inc. on linux
Type “help”, “copyright”, “credits” or “license” for more information.
>>> import dbm.gnu
Traceback (most recent call last):
File “”, line 1, in
File “/home/skip/miniconda3/envs/python39/lib/python3.9/dbm/gnu.py”, line 3, in
from _gdbm import *
ModuleNotFoundError: No module named ‘_gdbm’
I installed the conda gdbm
package, but that just installed some shell level tools, not the desired dbm.gnu stuff. Python 3.10.4 seems to have it:
% /usr/bin/python3
Python 3.10.4 (main, Jun 29 2022, 12:14:53) [GCC 11.2.0] on linux
Type “help”, “copyright”, “credits” or “license” for more information.
>>> import dbm.gnu
>>> dir(dbm.gnu)
(‘builtins’, ‘cached’, ‘doc’, ‘file’, ‘loader’, ‘name’, ‘package’, ‘spec’, ‘error’, ‘open’, ‘open_flags’)
I see nothing in conda search
output which would suggest gdbm
is available. I can switch to 3.10 without much trouble, but why gdbm
is nowhere to be found in Conda.