technicc
technicc

Reputation: 51

Python IDLE doesn't work because python.exe is missing

When I try to open .py files with IDLE (right click and "edit with IDLE"), Windows will ask whether to use python.exe to open this file. If I choose python, IDLE won't start properly.

If I use "open with" and navigate to Python27\Lib\idlelib\idle.bat I'll get an error:

Windows cannot find 'C:\Python27\Lib\idlelib....\pythonw.exe

If I start IDLE from start menu, Windows will open the installer and say "Please wait while Windows configures Python 2.7.13 (64-bit)" and if I have the Python installation file available, it will say "Error writing to file C:\Python27\pythonw.exe".

Starting IDLE from CMD (eg. >>python.exe C:\Python27\Lib\idlelib\idle.py) works normally.

I don't see pythonw.exe under C:\Python27\. Should it be there and how would it delete itself?

I'm using Windows 10 and this issue started a while back. I did a complete reinstall of python and packages and the issue was fixed for a short while, but it returned today.

Upvotes: 2

Views: 1258

Answers (1)

technicc
technicc

Reputation: 51

Okay, I've installed Process Monitor and set up filters to monitor the Python folder. Turns out Avast has been busy deleting pythonw.exefor a couple of months now.

It happened sparsely in the beginning, but last 12 deletes were from the past few days.

FIXED

Upvotes: 3

Related Questions