I have updated Python from 3.1.1 to 3.1.2 in Windows 10 but now modules not found

My modules are “not found” but if I reinstall them I get “requirement already satisfied”, Is there official safe advice how to upgrade Python from one version to the next? Presumably the folders for 3.1.1 are different from those for 3.1.2, so why does pip3 see only the old folders? I installed the new Python by running python-3.12.8-amd64.exe from the Python website.

3.1.2 or 3.12? Which one is it really?

Correction - I have upgraded/updated from 3.11.1 to 3.12.8. I assume each has its own folder tree, so pip3 is looking in the old one and not installing in the new one, whereas Python is looking in the new one not the old one.

Each Python will have it’s own pip. Double check your system %PATH% to figure out which one Windows calls first. Best practise is to use python -m pip to be sure you’re installing into the Python version you want. On Windows we’re blessed with py and can run py -3.12 -m pip

1 Like

If I type “py -3.12 -m pip3 install svg_turtle” I get “No module named pip3”. I assume it must be pip3 now, not pip, or are we going back to pip?

As far as I know pip has always worked for python3, but pip3 is an alias for people who might have python2 installed.

1 Like

It’s this command py -3.12 -m pip install svg_turtle (pip not pip3).

1 Like

Many thanks! This worked. So it’s pip again, now, not pip3. I have Python 2 installed as well as Python 3, which is why I assumed that pip3 was correct. Up to now it has been no problem.

The python module has always been pip, the pip3 is a command name not the module name.

Yes. To clarify, the program is pip on Windows and pip3 on macOS/Linux. But the module is always named pip, so the command line arguments will always be -m pip.

Also, you can always see what Python program will be run when you enter python by running where python on Windows.

EDIT: And the macOS/Linux equivalent is running which python3 to see what exactly runs (according to the PATH environment variable settings) when you enter python3.

2 Likes