importlib
Backport of importlib.import_module() from Python 2.7
What it is and what it does
This package is a backport of the importlib module from Python 2.7's standard library, intended for use with older Python releases that do not include importlib natively. It provides the import_module() function, which allows dynamic module imports by name at runtime. The code is copied directly from Python 2.7 standard library.
The package is no longer maintained. Its own documentation states that because it targets only end-of-life Python versions, no further updates will be released. If you need bug fixes or compatibility patches, the maintainers recommend copying the files manually from Python 2.7 source. Modern Python versions include importlib in the standard library, making this backport unnecessary for any currently-supported environment.
Use it for:
- Running legacy code on systems still using Python versions prior to 2.7 that rely on importlib.import_module().
- Porting code to older environments where importlib is not yet available in the standard library.
- Temporary compatibility layer when maintaining end-of-life Python deployments.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides importlib.import_module() for Python versions prior to 2.7, backporting the standard library's dynamic import function to older Python releases.
No. This package targets only Python versions that are no longer supported and is itself abandoned. Modern Python includes importlib in the standard library. Install it only if you are maintaining legacy code on an end-of-life Python version and cannot upgrade—and even then, consider upgrading Python instead.
Install
importlib on PyPI
pip
pip install importlibuv
uv add importlibpoetry
poetry add importlibInstalling importlib
Before you install
High install friction: the package is abandoned (last release 2016-08-31, last commit 2016-12-19) and explicitly states it will receive no further maintenance. It targets Python versions that are no longer supported.
License in practice
License treatment is unclear—no SPDX identifier or raw license text is provided in the package metadata, making it difficult to assess legal obligations before use.
Quickstart
pip install importlib==1.0.4
import importlib
module = importlib.import_module('os')
This package is only applicable to Python versions prior to 2.7 or Python 3.0; modern Python versions include importlib in the standard library and do not need this backport.
Verify before relying
- Whether this package is safe to use with any currently-supported Python version, or only with end-of-life releases.
- What the actual license is, given the metadata provides no SPDX identifier or raw license text.
- Whether the code has been modified from the Python 2.7 source or remains an exact copy.
Package facts
| License | not declared (unclear) |
| Python support | not specified |
| Install friction | high — source build required |
| Runtime dependencies | none |
| Maintenance | abandoned — 3,635 days since the last release |
| Last repo commit | (repository archived) |
| First released | |
| Downloads | 341,274/month — #7,405 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: importlib-1.0.4.zip
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
importlib-resourcesProvides a backport of Python's standard…
permissive · top 1,000 on PyPI
inspect2Provides the Python 3.6 inspect module API on…
permissive · top 15,000 on PyPI
typingProvides type hints and annotations for Python…
permissive · top 5,000 on PyPI
backports.entry-points-selectableProvides forward-compatible access to…
permissive · top 15,000 on PyPI
importlib-metadataProvides third-party access to Python package…
permissive · top 100 on PyPI
asyncioThis package is an obsolete backport of…
permissive · top 1,000 on PyPI
linecache2Provides a backport of Python's linecache…
permissive · top 5,000 on PyPI
django-utils-sixProvides a backport of Django 2.2's…
permissive · top 15,000 on PyPI
feedparser-sgmllibProvides the sgmllib SGML parser from Python…
permissive · top 5,000 on PyPI
mda-xdrlibProvides the xdrlib module for encoding and…
permissive · top 15,000 on PyPI