Skip to content

Pip warns about a new release 25.0.1 even when a newer version is installed. #13839

@julie777

Description

@julie777

Description

Running pip always gives warning that a new version is available regardless of version installed.

    [notice] A new release of pip is available: 25.0.1 -> 26.0.1
    [notice] To update, run: python.exe -m pip install --upgrade pip

Running python.exe -m pip install --upgrade pip multiple times causes the output to toggle between
Successfully installed pip-25.0.1
and
Successfully installed pip-26.0.1
as shown in Example 1 below.

and installing version 26.0.1 and 25.0.1.

I deleted the pip cache dir and now every run of python.exe -m pip install --upgrade pip the output has
Successfully installed pip-25.0.1

Example 2 below shows verbose output after deleting the cache which shows where files are being downloaded from.

It occurred to me to check the actual pip version instead of believing the output from the upgrade command pip always reports the version as 26.0.1, indicating that the output from the upgrade command is wrong.

Based on my analysis
- there is a bug in the "check for update" code that makes it think that version 25.0.1 is running, but only in the "check for update" code because python -m pip --version shows the correct version
- there is a bug in the update code that causes it to incorrectly report the version of the newly installed pip.

Example 1 output:

$ python -V
Python 3.12.10
$ pip -V
pip 26.0.1 from C:\Users\julie\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip (python 3.12)
$ python.exe -m pip install --upgrade pip
Collecting pip
  Using cached pip-26.0.1-py3-none-any.whl.metadata (4.7 kB)
Using cached pip-26.0.1-py3-none-any.whl (1.8 MB)
Installing collected packages: pip
Successfully installed pip-25.0.1

[notice] A new release of pip is available: 25.0.1 -> 26.0.1
[notice] To update, run: python.exe -m pip install --upgrade pip
$ python.exe -m pip install --upgrade pip
Collecting pip
  Using cached pip-26.0.1-py3-none-any.whl.metadata (4.7 kB)
Using cached pip-26.0.1-py3-none-any.whl (1.8 MB)
Installing collected packages: pip
Successfully installed pip-25.0.1

[notice] A new release of pip is available: 25.0.1 -> 26.0.1
[notice] To update, run: python.exe -m pip install --upgrade pip
$ python.exe -m pip install --upgrade pip
Collecting pip
  Using cached pip-26.0.1-py3-none-any.whl.metadata (4.7 kB)
Using cached pip-26.0.1-py3-none-any.whl (1.8 MB)
Installing collected packages: pip
Successfully installed pip-25.0.1

[notice] A new release of pip is available: 25.0.1 -> 26.0.1
[notice] To update, run: python.exe -m pip install --upgrade pip
$

Example 2

$ python.exe -m pip -v install --upgrade pip
Using pip 26.0.1 from C:\Users\julie\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip (python 3.12)
Collecting pip
  Obtaining dependency information for pip from https://files.pythonhosted.org/packages/de/f0/c81e05b613866b76d2d1066490adf1a3dbc4ee9d9c839961c3fc8a6997af/pip-26.0.1-py3-none-any.whl.metadata
  Downloading pip-26.0.1-py3-none-any.whl.metadata (4.7 kB)
Downloading pip-26.0.1-py3-none-any.whl (1.8 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.8/1.8 MB 6.1 MB/s  0:00:00
Installing collected packages: pip
Successfully installed pip-25.0.1

[notice] A new release of pip is available: 25.0.1 -> 26.0.1
[notice] To update, run: python.exe -m pip install --upgrade pip
$ python.exe -m pip -v install --upgrade pip
Using pip 26.0.1 from C:\Users\julie\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip (python 3.12)
Collecting pip
  Obtaining dependency information for pip from https://files.pythonhosted.org/packages/de/f0/c81e05b613866b76d2d1066490adf1a3dbc4ee9d9c839961c3fc8a6997af/pip-26.0.1-py3-none-any.whl.metadata
  Using cached pip-26.0.1-py3-none-any.whl.metadata (4.7 kB)
Using cached pip-26.0.1-py3-none-any.whl (1.8 MB)
Installing collected packages: pip
Successfully installed pip-25.0.1

[notice] A new release of pip is available: 25.0.1 -> 26.0.1
[notice] To update, run: python.exe -m pip install --upgrade pip
$

$ python -m pip --version
pip 26.0.1 from C:\Users\julie\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip (python 3.12)

Expected behavior

Pip should only warn about a new version when a version newer than the current version is installed.

pip version

25.0.1 and 26.0.1

Python version

3.12.10

OS

Windows running git bash

How to Reproduce

  1. run pip and get warning about new version 25.0.1 available
  2. run python.exe -m pip install --upgrade pip to install newest version
    a. version 26.0.1 is installed
    b. get warning newer version 25.0.1
  3. run python.exe -m pip install --upgrade pip to install newest version
    a. version 25.0.1 is installed
    b. get warning newer version 25.0.1

Output

No response

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions