This might be needed when pip
install was skipped when installing Python (or when creating a virtual env) or after explicitly uninstalling pip
.
- Invoke CLI using
-m
switch:
python -m ensurepip
- To upgrade the installed version of
pip
, pass the--upgrade
option as:
python -m ensurepip --upgrade