Search code examples
pythonpip

Why does pip install in the Python38 folder, instead of the Python311 folder?


I keep trying to install pip in various different ways, yet everytime I try to, it does not work. I tried to investigate by going to the Python folder in C:\Users(my pc name)\AppData\Local\Programs\Python, and even after I deleted my previous Python folders, uninstalled and fixed my PATH variables. Any clue why this is happening?

Update: No solution has been found, so for now I'm going to hard-reset python by uninstalling everything, then trying to reinstall and such. I'll make a second update if what I try works.

Update 2: Got the same error, so reverted back to 3.10.9, and it was completely fixed. Not sure why 3.11.1 doesn't work with my pc, but I fixed it by updating my pip.ini file in %APPDATA%\pip\pip.ini .


Solution

  • Because in your case older python was installed before latest. Overlap happend in namespase, when new python took python name, but new pip dont.

    That issue occurs because pip is actually separate from python. And it have new lead number versions often, which probably occured in betwin your python versions installations.

    Deleting all Python versions and clean install, starting from latest version, seems easiest solution.