Why doesn't python 3.10.0 show up on PowerShell?

Greetings, all

I am excited to learn python, and have enrolled in a course to this effect. However, I started encountering problems right off the mark.

I installed Python 3.10.0 from the Python homepage (it defaulted to the amd64 installer for Windows) and followed all the steps - disable the 260 character limit, add python to path, etc. - and even checked that the paths are correct. Yet, when I open run CMD or open PowerShell and type “python -V”, it shows that I have python 2.4.5 installed. When I type “python3”, it shows some kind of “not found” message". If I can, I will add screenshots and my machine’s DXDiag file.

What am I doing wrong?

Thanks in advance

1 Like

To see all “python” commands in PATH, execute the following command, depending on your preferred shell:

  • CMD: where python
  • PowerShell: get-command -all python
  • bash: which -a python.exe

PATH is constructed by concatenating the system and user registry “Path” values, in that order. The OS and shell search PATH sequentially in order from beginning to end, until the first match. So, for example, if 2.4 is in the system “Path”, it takes precedence over 3.10 in the user “Path”.

You can use the py command instead of python. By default py runs the highest version that’s installed. You can also run a particular major[.minor][-32|-64] version, e.g. py -3.10 or py -2.4.

1 Like

Python can be installed for system-wide use and/or for single-user use. Single-user installations will be in C:\Users\{user}\AppData\Local\Programs\Python.

Is there any benefit to a system-wide installation? If so, how would I do that?

I do not know what the advantage of a system-wide installation is but I prefer it. My PC is a personal computer (mine) so there is no reason to limit the use of Python to just one user. I suppose the main difference is that a system-wide installation requires administrator privileges and that is no problem for me.

I am not sure what is necessary to do a system-wide installation but as far as I know the main determination is whether the installation is done with administrator privileges. So for Windows execute the command prompt as administrator and it will likely do the install system-wide.

1 Like

Thank you. I checked last night and you’re right, it does launch python 3.10.0 this way.

I had a similar problem.
Path had to be on top in PATH variable

image