Home > Blockchain >  different python versions from the same command prompt in windows
different python versions from the same command prompt in windows

Time:11-24

My question is to do with calling python from a command prompt in windows 10 after installing a new version (3.9 to 3.10).

when i type (into a cmd prompt): py i get Python 3.10.0.

when i type (into a cmd prompt): python i get Python 3.9.6.


so two questions:

  1. Why do i get two different versions when typing python compared to py ?
  2. How can i ensure that they point to the same version or how can i select different versions ?

CodePudding user response:

This is because there are two versions of python on your computer. When you want to reference to a particular version of python just do: py - version


For example, if you want to reference to python 3.10 in cmd, do: py - 310 And when you want to reference to 3.9 do: py - 39


Make sure you have the correct spacing^

  • Related