2

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.

3
  • 1
    I can't comment on how it's disappearing, but can confirm that C:\Python27\pythonw.exe should exist. Commented Jun 1, 2017 at 11:30
  • Thank you. I ran the python installer and selected repair, the pythonw.exe file is now back and everything seems to work. So the issue is then how this file miraculously stops existing. Commented Jun 1, 2017 at 11:45
  • I think it is going to be difficult to diagnose until we have some sort of clue as to what you do around the time it disappears. Commented Jun 1, 2017 at 13:31

1 Answer 1

3

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.