Interactive freezes when I type something into the shell

Mar 7, 2015 at 4:16 AM
The Python interactive freezes when I type something into the window. Even after uninstalling and reinstalling Visual Studio, it still freezes. In addition, programs executed in the Python interactive do not execute properly. For example, the default Hello World project executes in the Python interactive, but no output appears. Running through other methods outside of the interactive does not cause any problem. Occasionally, a message appears saying that “Microsoft Visual Studio is waiting for an internal operation to complete.”
This problem started when I changed the color scheme. I changed the “Python Builtins” color to purple. Even after I changed it back, it still froze. After it freezes, I always have to kill it using Task Manager.
Mar 9, 2015 at 3:43 PM
Are you using PTVS 2.1 or one of our dev builds? And which version of Visual Studio are you on?

It's possible that the latest builds have fixed this issue already, so if you could try one of those it would be great. Otherwise, there are a few things we can try to figure out exactly where things are going wrong.
Mar 14, 2015 at 5:23 AM
I was using PTVS 2.1 in Visual Studio Community 2013, on Windows 8.1 64 bit. I tried the latest dev build (2015-03-13), but code still does not run when executed in the interactive.

At least I can type in "print" before a left parenthesis freezes Visual Studio.

Any suggestions?
Mar 14, 2015 at 1:49 PM
When it's frozen, how does the disk and CPU usage look? It may be frozen but busy, in which case it will eventually come back to life (likely loading the completion db, so it depends on how many packages you have).
Mar 21, 2015 at 6:01 AM
Edited Mar 21, 2015 at 6:44 PM
Weirdly, the problem fixed itself when I upgraded Python. Everything works fine now.

I decided to update Python (3.4.2) to the latest version. After installing it, I realized that I forgot to uninstall the old version of Python. I uninstalled it and repaired the new installation, in case some of its files were removed in the uninstall.

The next time I started Visual Studio, I performed the same sequence of actions. Everything worked properly. After opening a file and working on it, I noticed that everything ran slower. After the program finished executing, I typed a print command into the interactive. It froze. After a few seconds, I got a message saying that "pythonw.exe has stopped working". I clicked "Close the program". Then, I was able to exit out of Visual Studio using the menus.

After that, when I started Visual Studio again and repeated the above actions, everything ran perfectly. I did not suspect Python at first because IDLE (the IDE that ships with Python) was able to execute commands perfectly. I am now using PTVS without any problems now.

Somehow, changing the color options in Visual Studio corrupted a portion of Python's files.

Thanks for helping me fix the problem.

EDIT: For the record, both the disk and the CPU were low (~5%) while Visual Studio froze.