My command prompt is currently running Python 3.2 by default how do I set it up to run Python 2.7 by default, I have changed the PATH variable to point towards Python 2.7, but that did not work.
UPDATE:
It still does not work. 🙁
Still running python3 – to be specific it runs python3 when I am trying to install flask – which is what I want to do.
More generally, when I simply type python into the command line, it does nothing.
I get a ‘python’ is not recognized as an internal or external command, operable program, or batch file error.
No idea what to do.
If you call your Python scripts directly using
python script.pythen setting the PATH to have the 2.7 directory first should be enough.If you want to call Python scripts indirectly with the shell, i.e. by writing just
script.pyor by executing the file from the explorer, you need to set the 2.7 installation as the default program handler for the.pyextension. The easiest way to do that is to run the Python installer again and choose the option “make this installation the default”.Note that with the new launcher, that ships with 3.3+, you don’t need this, as you can specify the version number using a shebang line and the launcher will automatically pick the appropriate interpreter.