Interactive mode frozen on python 3.6.2 (Windows 7)

Bug report

Bug summary

Interactive mode in frozen in python 3.6.2 in Windows 7. I tried matplotlib 1.5.3, 2.0.2 and 2.1.0rc1. All of them have the same issue. Both the anaconda build and official build of python 3.6.2 have the issue. But python 3.5.1 works fine.

Code for reproduction

import matplotlib.pyplot as plt

plt.ion()
plt.plot([0, 1], [0, 1])
input('Press enter to exit')

Actual outcome

The matplotlib GUI screen shown up is frozen. Below is a screenhoot running with python 3.6.2 and matplotlib 2.0.2:

mpl

Expected outcome

The same code works fine on python 3.5.1. Below is a screenshoot running with python 3.5.1 and matplotlib 2.0.2:

mpl35

Matplotlib version

  • Operating System: Windows 7 (64 bit)
  • Matplotlib Version: 1.5.3, 2.0.2, 2.1.0rc1
  • Python Version: 3.6.2 (64 bit)
  • Jupyter Version (if applicable):
  • Other Libraries: