Import and Packaging Modules
ensurepip
Bootstraps pip from components supplied with the Python installation, without downloading them from the internet. It may be absent from distributor builds and is unavailable on some platforms. version reports the bundled pip version without installing it. The example avoids bootstrap and changes no installation.
Formal Syntax & Structure
python syntaxpython
import ensurepipReturn Value
module
Module namespace available through import; import is a statement, not a value-returning expression.
Working Example
Example Snippetpython
import ensurepipprint(bool(ensurepip.version()))