Pip install at command line is installing to previous version of python

Hello,

I have installed python 3.12 on Windows 10. I also have python 3.10 and 3.11 installed.
My issue is installing packages via pip install is still looking at the python 3.11 library instead of python 3.12. I don’t remember having this issue when moving from 3.10 to 3.11 and I don’t know what I did wrong.

I have uninstalled and reinstalled python 3.12 a couple times, the last time ensuring I checked the box to add python to PATH. I checked the PATH and python 3.12 was in there twice. I saw a help message that suggested deleting the first python 3.12 entry in the PATH, so I did. When I type where python at the command line it now shows me python 3.12, as last in the list. I went back into my PATH and moved python 12 up to the top, but where python still shows python 3.11 first.

When I try to run pip install [package name] it tells me the package already exists in python311 library. When I try to run a python program in IDLE 3.12, it tells me it can’t find the packages in the python312 library.

I want to be able to run pip install [package name] and have it installed in the python312 library. I am not sure what to try next.

Thank you for your help!

Assuming you can use the py.exe launcher, it should be py -3.12 -m pip install <packagename>

2 Likes

Thank you very much, that worked!