Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 661
slashdottir Avatar asked Jun 06 '17 16:06

slashdottir


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

like image 195
Brian M. Sheldon Avatar answered Sep 28 '22 23:09

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: 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()
like image 43
fireman777 Avatar answered Sep 29 '22 01:09

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.

like image 38
sdd Avatar answered Sep 28 '22 23:09

sdd