Python Glossary Русский

all Python 3until 3.13WindowsRemoved from the standard libraryterm

msilib

removed modules

Build Windows Installer (.msi) packages. Windows-only. Removed in Python 3.13 with no stdlib replacement — use the WiX Toolset.

Syntax

import msilib  # до 3.13

msilib gave access to the Windows Installer database: msilib.init_database() created an .msi, add_tables() and Directory/Feature filled it. It was used mostly by distutils for the bdist_msi command, which left with distutils in Python 3.12. PEP 594 dropped it: it had almost no outside users and no maintainer. There is no stdlib replacement, and What's New 3.13 names no PyPI package that restores it. Installers are built with external tools today: the WiX Toolset, cx_Freeze with its own bdist_msi command, or a wheel for pip instead of an .msi.

Examples

# Python 3.13+
try:
    import msilib
except ModuleNotFoundError as e:
    print(type(e).__name__)  # → ModuleNotFoundError
# Python 3.13+
import sys
# Установщик собирают внешним инструментом, например WiX:
# wix build product.wxs -o app.msi
print(sys.version_info >= (3, 13))  # → True

See also

Common errors

Open in the full glossarydocs.python.orgReport an inaccuracy