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
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.
It’s this command py -3.12 -m pip install svg_turtle
(pip not pip3).
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
.
I am trying to install numpy in such a way that Python 3.1.2 finds it.
I type:
“py -3.12 -m pip install numpy”
and I get:
“Requirement already satisfied: numpy in c:\users\jrsid\appdata\local\programs\pytho
n\python311\lib\site-packages (2.2.1)”
but should it not be in the folder python312 rather than python311 if I am running python 3.1.2? Is there a way of installing numpy to the correct folder?
I have uninstalled Python 3.1.2. On my machine Python 3.1.1 finds Numpy whereas Python 3.1.2 does not. There are many solutions to the problem of NumPy not being found although installed. As in medicine this means that none of them works. Perhaps one day Python will have a user-friendly system for upgrading.
Hello,
type this in the cmd
prompt:
python --version
What version does it give you? If it still points to v3.11
, your pip
installs will still be downloaded to the v3.11
directory. You will have to change the path
to point to the new v3.12
.
Here is a thread that is related to your issue (after making changes, you have to reboot for changes to take effect).
As an fyi …
If you use PyCharm
, you have the option of using different Python
interpreters. Each have their own dedicated pip
such that when you switch between interpreters, they have their own ecosystem of library packages
.
Why are you talking about Python 3.1 again? Didn’t we establish that you’re dealing with 3.11 or 3.12? Are you actually using 3.1 after all?