Windows refuses to “Open with” python.exe

Posted on


I was doing some messing around, trying to install some new python-oriented things, when some how I did something that caused .py and .pyw files to be disassociated with python.exe. I was meaning to install 3.4 anyway (the last version was 3.3.x) so I uninstalled and deleted python, and installed 3.4. The problem is, the .py files are still not associated, and when I try to change the default program using the “Open with” dialogue box, when I locate at double click on the python.exe file in its installation directory, Windows doesn’t add it to the list of programs to choose from. It just stays exactly the same. I have never seen it happen before, it doesn’t give a reason. The same thing happens if I try to use pythonw.exe


You could try following my answer to this question. In the second step, replace php_auto_file with either py_auto_file or pyfile. And in the third step, replace sublime_text.exe with path to python.exe

Repeat the above for the .pyw extension as well.

Leave a Reply

Your email address will not be published. Required fields are marked *