> **Источник:** https://python-all.ru/3.6/library/modules.html
>
> «Документация Python на русском» – неофициальный перевод официальной документации Python: версии от 2.6 до 3.16, полнотекстовый поиск, английский оригинал рядом с переводом. Эта Markdown-версия страницы предназначена для работы с LLM: вставьте её в ChatGPT, Claude или Cursor.

---

# 31. Импорт модулей

Модули, описанные в этой главе, предоставляют новые способы импорта других модулей Python и перехватчики для настройки процесса импорта.

Полный список модулей, описанных в этой главе:

- [31.1. `zipimport` – Импорт модулей из Zip-архивов](https://python-all.ru/3.6/library/zipimport.html)

  - [31.1.1. Объекты zipimporter](https://python-all.ru/3.6/library/zipimport.html#zipimporter-objects)
  - [31.1.2. Примеры](https://python-all.ru/3.6/library/zipimport.html#examples)
- [31.2. `pkgutil` – Утилита расширения пакетов](https://python-all.ru/3.6/library/pkgutil.html)
- [31.3. `modulefinder` – Поиск модулей, используемых скриптом](https://python-all.ru/3.6/library/modulefinder.html)

  - [31.3.1. Пример использования `ModuleFinder`](https://python-all.ru/3.6/library/modulefinder.html#example-usage-of-modulefinder)
- [31.4. `runpy` – Поиск и выполнение модулей Python](https://python-all.ru/3.6/library/runpy.html)
- [31.5. `importlib` – Реализация `import`](https://python-all.ru/3.6/library/importlib.html)

  - [31.5.1. Введение](https://python-all.ru/3.6/library/importlib.html#introduction)
  - [31.5.2. Функции](https://python-all.ru/3.6/library/importlib.html#functions)
  - [31.5.3. `importlib.abc` – Абстрактные базовые классы, связанные с импортом](https://python-all.ru/3.6/library/importlib.html#module-importlib.abc)
  - [31.5.4. `importlib.machinery` – Импортёры и перехватчики путей](https://python-all.ru/3.6/library/importlib.html#module-importlib.machinery)
  - [31.5.5. `importlib.util` – Вспомогательный код для импортёров](https://python-all.ru/3.6/library/importlib.html#module-importlib.util)
  - [31.5.6. Примеры](https://python-all.ru/3.6/library/importlib.html#examples)

    - [31.5.6.1. Программный импорт](https://python-all.ru/3.6/library/importlib.html#importing-programmatically)
    - [31.5.6.2. Проверка возможности импорта модуля](https://python-all.ru/3.6/library/importlib.html#checking-if-a-module-can-be-imported)
    - [31.5.6.3. Импорт исходного файла напрямую](https://python-all.ru/3.6/library/importlib.html#importing-a-source-file-directly)
    - [31.5.6.4. Настройка импортёра](https://python-all.ru/3.6/library/importlib.html#setting-up-an-importer)
    - [31.5.6.5. Аппроксимация `importlib.import_module()`](https://python-all.ru/3.6/library/importlib.html#approximating-importlib-import-module)
