PROBLEM
Attempts to execute a python file in Windows Command Prompt fail, and the following error message is returned:
Error: This app can't run on your PC. To find a version for your PC, check with the software publisher.
The python.exe file is corrupted, as it has a file size of 0kb. Windows executable files cannot be 0kb in size.
Download and reinstall the python.exe file. The necessary Python version is listed in the knowledge base article, FAQ: What version of Python is used in ArcGIS?, and the python.exe file can be downloaded from Python: Download the latest version. The default location for the python.exe file depends on the version, as demonstrated below.
C:\Python27\ArcGIS10.x
C:\Program Files\ArcGIS\Server\framework\runtime\ArcGIS\bin\Python\envs\arcgispro-py3
C:\Program Files\ArcGIS\Server\framework\runtime\ArcGIS\bin\Python\Scripts\propy.bat
Get help from ArcGIS experts
Download the Esri Support App