Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is there `pip3.10.exe` in `Python311\Scripts`

As you can see below, after I installed Python 3.11, I came to the realization that running pip3.10 freeze did not list me the packages I had in my Python 3.10.2 but those of my Python 3.11. This is explained by the fact that in Python311\Scripts I have both pip3.10.exe and pip3.11.exe. Is there a reason? When I want to pip install or do pip freeze with pip3.10 I need to use the absolute path now.

enter image description here

like image 411
FluidMechanics Potential Flows Avatar asked Sep 05 '25 01:09

FluidMechanics Potential Flows


1 Answers

This was a pip bug, I don't understand the details exactly but when pip tried to match to the correct Python version it was only accounting for single-digit version numbers, resulting in this weird behavior. Perhaps it is better explained in this thread on github.

To summarize that thread (from user uranusjr):

pip contains logic to specially fix pipX.Y (and easy_install-X.Y) entry points to correctly match the Python version, but that logic only accounts for single-digit version numbers and doesn’t work with 3.10 upwards.

This was fixed with pip version 22.3.1 (Also seen on this github thread), and from what I can tell doesn't occur anymore when using python 3.11.1.

like image 140
Alexander Freyr Avatar answered Sep 07 '25 04:09

Alexander Freyr