On this page
  1. ensurepip.bootstrap
  2. Import
  3. Signature & Overview
  4. Usage
  5. Gotchas
  6. REPL Inspect

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

REPL Inspect

from ensurepip import bootstrap
help(bootstrap)

Linked from

Related notes