Enabling Optional Modules

A number of modules in the standard library are disabled due to system differences and dependencies on third-party packages. To enable these modules, you must edit a configuration file and rebuild the interpreter (note that this is primarily an issue for UNIX systems).

For versions of Python prior to 2.1, the file Modules/Setup in the Python source distribution contains configuration data for modules built into the Python interpreter. It contains entries of this form:

signal signalmodule.c          # signal(2) 
... 
#readline readline.c -lreadline -ltermcap 

Each line indicates the name of a module, followed by source files, compiler options, and link libraries needed to compile that module. A line starting with # is a comment ...

Get Python Essential Reference, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.