Can't run python on windows anymore


Since the most recent update to Windows 10, I have been seeing this message every time I try to do anything with Python

This app can't run on your PC

I have reinstalled it, tried running it as administrator. Nothing works.

Asked By: slashdottir



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.


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
enter image description here

Answered By: Brian M. Sheldon

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:
By the way, one of the way to exit from python (v3) in Windows:

>>> import sys
>>> sys.exit()
Answered By: fireman777

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.

Answered By: sdd

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.

Answered By: RandString