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.
C:\Python27\pythonw.exeshould exist.