[issue45148] ensurepip upgrade fails

Paul Moore report at bugs.python.org
Thu Sep 9 03:23:50 EDT 2021


Paul Moore <p.f.moore at gmail.com> added the comment:

>From the documentation:

> upgrade indicates whether or not to upgrade an existing installation of an earlier version of pip to the bundled version.

Note the comment "to the bundled version". This command will not access the internet (also noted in the documentation) and so will not get a later version than the bundled one.

To get the latest version of pip, you need to use

    /path/to/your/python -m pip install --upgrade pip

Note:

1. You must *not* use the pip executable, you must use `python -m pip`, as the command will be upgrading the pip executable and Windows won't let you upgrade an executable you are using.
2. You should use the full path to your Python, or ensure by other means that you are running the correct copy of Python. This command only upgrades the copy of pip associated with the Python interpreter you use to run the upgrade command.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45148>
_______________________________________


More information about the Python-bugs-list mailing list