Linux Commands Examples

A great documentation place for Linux commands


byte-compile python modules


update-python-modules [options] [package.public [...]]

add an example, a script, a trick and tips

: email address (won't be displayed)
: name

Step 2

Thanks for this example ! - It will be moderated and published shortly.

Feel free to post other examples
Oops ! There is a tiny cockup. A damn 404 cockup. Please contact the loosy team who maintains and develops this wonderful site by clicking in the mighty feedback button on the side of the page. Say what happened. Thanks!


no example yet ...

... Feel free to add your own example above to help other Linux-lovers !


The update-python-modules command is part of the python-support bundle.

update-python-modules is responsible for the byte-compilation of python modules. When used in byte-compilation mode, it will byte-compile modules references in the files given on the command line. When used in installation mode, it will byte-compile them once for each installed python version, and will make them available for all of them.

At each invocation, with or without arguments, update-python-modules will check for installed python versions, and will build or remove modules according to new or removed versions since the last time it was run.


-h, --help

Show summary of options.

-v, --verbose

Detail all actions while they are performed.

-b, --bytecompile

Only accept to work on private modules. When given this option, update-python-modules will fail if passed references to public modules.

-i, --install

Only accept to work on public modules. When given this option, update-python-modules will fail if passed references to public modules.

-c, --clean

Clean modules instead of installing them.

-a, --rebuild-all

Rebuild all private modules. This is necessary when the default python version was changed, for example.

-f, --force-rebuild-all

Clean all modules (public and private), and rebuild them.


Arguments must be files or directories located in the /usr/share/python-support directory. Depending on their extension, they are treated differently.

A file listing public modules to install for each version. These modules must lie in /usr/share/pyshared or /usr/lib/pyshared.


A file listing private modules to byte-compile for one Python version.


A legacy directory hierarchy of public modules. The C extensions and portions that change with the Python version are to be found in /usr/lib/python-support/pythonX.Y/package/.


A legacy file listing directories where to find private modules.



These directories contain the byte-compiled modules for version pythonX.Y.

see also



Josselin Mouette <joss[:at:]debian[:dot:]org>.

How can this site be more helpful to YOU ?

give  feedback