'python3' is not recognized as an internal or external command, operable program or batch file

Gaurav Shukla picture Gaurav Shukla · Oct 7, 2016 · Viewed 123k times · Source

I am using Python 3.5.2 version on Windows 7 and tried using python3 app.py. I am getting this error message:

'python3' is not recognized as an internal or external command,
operable program or batch file. 

Is there any specific cause about why the python3 command is not working?

I also verified that the PATH is added to environment variables.

Answer

Vlad Bezden picture Vlad Bezden · Jan 5, 2017

There is no python3.exe file, that is why it fails.

Try:

py

instead.

py is just a launcher for python.exe. If you have more than one python versions installed on your machine (2.x, 3.x) you can specify what version of python to launch by

py -2 or py -3