Can't run python on windows anymore
Question:
Answers:
First make sure that python.exe
exists in the given directory and that its not a zero-length file. More likely though is that you installed the wrong version of python. Make sure you download and install the x86 version as it will work on both 64-bit and x86 systems. Do a full uninstall and install python via the Windows x86 MSI installer.
Edit:
If this doesn’t work please provide more information on which specific Windows 10 version you are running and which python installer you are using.
Edit 2:
You can also get more information from the Windows Event Log

I think the reason is that python.exe has size 0 Kb. It could happen because you (and me too) didn’t exit from Python correctly.
The way to fix the issue is to re-install Python or download "portable" version:
https://www.python.org/downloads/release/python-385/
By the way, one of the way to exit from python (v3) in Windows:
>>> import sys
>>> sys.exit()
I’ve also had "This app can’t run on your PC" windows 10 dialog box starting to appear after I tried to start x64 app from python script under x86 python.
Uninstalled x86 python, installed x64 python and all started to work normal.
I didn’t have to reinstall Python.
python.exe
inside my envScripts
became 0kb for some reason. So I created another virtual-env and copied python.exe
from there to this folder. Then it started working.
First make sure that python.exe
exists in the given directory and that its not a zero-length file. More likely though is that you installed the wrong version of python. Make sure you download and install the x86 version as it will work on both 64-bit and x86 systems. Do a full uninstall and install python via the Windows x86 MSI installer.
Edit:
If this doesn’t work please provide more information on which specific Windows 10 version you are running and which python installer you are using.
Edit 2:
You can also get more information from the Windows Event Log
I think the reason is that python.exe has size 0 Kb. It could happen because you (and me too) didn’t exit from Python correctly.
The way to fix the issue is to re-install Python or download "portable" version:
https://www.python.org/downloads/release/python-385/
By the way, one of the way to exit from python (v3) in Windows:
>>> import sys
>>> sys.exit()
I’ve also had "This app can’t run on your PC" windows 10 dialog box starting to appear after I tried to start x64 app from python script under x86 python.
Uninstalled x86 python, installed x64 python and all started to work normal.
I didn’t have to reinstall Python.
python.exe
inside my envScripts
became 0kb for some reason. So I created another virtual-env and copied python.exe
from there to this folder. Then it started working.