pythonpipvirtualenvenvironment

pip says to upgrade while already updated


while using pip I often has the message:

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

However when I do :pip -V, python -m pip -V py -m pip -V, all returns me

pip 24.0 from C:\Python310\lib\site-packages\pip (python 3.10)

and when I do python.exe -m pip install --upgrade pip

I have this:

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

So it looks like I have the latest version but it doesn't recognize it.

Is there a way to fix that?


Solution

  • In fact, I had multiple .dist-info files in pip location folder.

    Keeping only only the last one and deleting the others solved the issue

    (In something like "..\PythonXX\Lib\site-packages\pip-old.dist-info")