On this page
ensurepip.bootstrap
Up: ensurepip | Next: ensurepip.version
Rel: ensurepip.version
Ref: docs.python.org — ensurepip.bootstrap
Tags: #public #python3 #stdlib #ensurepip
Import
import ensurepip
from ensurepip import bootstrap
Signature & Overview
ensurepip.bootstrap(*, root=None, upgrade=False, user=False, altinstall=False, default_pip=False, verbosity=0)
Bootstrap pip into the current Python installation (or the given root directory).
Usage
import ensurepip
# Installs the bundled pip wheel offline (normally run via `python3 -m ensurepip --upgrade`)
assert callable(ensurepip.bootstrap)
Gotchas
- Offline bootstrap only: Installs the bundled wheel shipped with Python, not the newest PyPI version.
REPL Inspect
from ensurepip import bootstrap
help(bootstrap)
Linked from
Related notes
- tuts/python3/stdlib_module/ensurepip/version Linked here; links to this page; shared tags: #ensurepip, #stdlib
- tuts/python3/stdlib_module/ensurepip Linked here; links to this page; shared tags: #stdlib
- tuts/c/stdlib shared tags: #stdlib
- tuts/c/stdlib/assert shared tags: #stdlib
- tuts/c/stdlib/assert/assert shared tags: #stdlib
- tuts/c/stdlib/assert/static_assert shared tags: #stdlib
- tuts/c/stdlib/ctype shared tags: #stdlib
- tuts/c/stdlib/ctype/isalpha shared tags: #stdlib
- tuts/c/stdlib/ctype/isdigit shared tags: #stdlib
- tuts/c/stdlib/ctype/isspace shared tags: #stdlib