[Tutor] python build issues (missing modules)

Hugo Arts hugo.yoshi at gmail.com
Sat May 29 03:43:06 CEST 2010


First of all, don't reply to an e-mail unrelated to your own problem,
create a new thread. The subject line is very confusing, and it also
screws up thread-based mail readers like gmail.

On Sat, May 29, 2010 at 3:17 AM, Karl Jansson <janssonks at gmail.com> wrote:
> I was trying to build python, and this printed to the terminal:
>
> Python build finished, but the necessary bits to build these modules were not found:
> _gdbm              ossaudiodev        readline
> spwd

These are a few python modules part of the standard library. gdbm are
python bindings to the GNU dbm library (a simple database),
ossaudiodev provides low-level access to oss audio devices, readline
provides advanced line-editing capabilities, and spwd gives access to
the UNIX shadow password file.

> To find the necessary bits, look in setup.py in detect_modules() for the module's name.
>
> I'm new to python, so i don't know if this is important, or what it means at all.  I looked in setup.py, and it didn't tell me anything.  What does it mean by "the necessary bits" were not found?

The libraries are written in C, and depend on external libraries. The
build system could not find all of the required files to build them.
That doesn't mean the build failed, you'll have a working python, but
you'll be unable to use these modules in your python code. Most of
these libraries are not terribly important (YMMV), but not having the
readline module might also affect behaviour of the interactive
interpreter (not sure on this one).

To fix it, you'll need to get the required files. Most linux distros
will have some kind of separate development package that has the
files. On ubuntu, for example, you might try something akin to this:

$ sudo apt-get install build-essential libgdm-dev libreadline5-dev

That should get you the files needed to compile at least the readline
and _gdbm files. as for hunting down the others, checking the function
named in the error message might provide a clue as to what's needed.

Hugo


More information about the Tutor mailing list