"Kernel died, restarting" when using matplotlib.pyplot
See original GitHub issueDescription of your problem
IPython console dies after using matplotlib.pyplot
What steps will reproduce the problem?
- Using matplotlib.pyplot in any way. E.g. after
import matplotlib.pyplot as plt, usingfig=plt.figure(1,figsize=(5,2),dpi=120)orcs=m.contourf(x,y,Z[:],cmap=plt.get_cmap('gist_earth'))
What is the expected output? What do you see instead? IPython console shows “Kernel died, restarting” and all variables are cleared.
Please provide any additional information below
Not sure if this has something to do with this error, but I noticed that sometimes (not always) when I run spyder from the terminal, as soon as it opens IPython console gives the same message (“Kernel died, restarting”) and terminal shows this error:
(python:2992): Gtk-CRITICAL **: IA__gtk_widget_get_direction: assertion 'GTK_IS_WIDGET (widget)' failed.
Versions and main components
- Spyder Version: 3.1.2
- Python Version: 3.4.5
- Qt Version: 4.8.7
- PyQt Version: PyQt4 (API v2) 4.11.4 on Linux
- Operating system: Linux Mint 17.2 32 bits
Dependencies
jedi >=0.8.1 : 0.9.0 (OK) matplotlib >=1.0 : 1.5.1 (OK) nbconvert >=4.0 : 4.2.0 (OK) numpy >=1.7 : 1.10.2 (OK) pandas >=0.13.1 : 0.18.1 (OK) pep8 >=0.6 : 1.7.0 (OK) psutil >=0.3 : 5.0.1 (OK) pyflakes >=0.6.0 : 1.5.0 (OK) pygments >=2.0 : 2.1.3 (OK) pylint >=0.25 : 1.6.4 (OK) qtconsole >=4.2.0: 4.2.1 (OK) rope >=0.9.4 : 0.9.4-1 (OK) sphinx >=0.6.6 : 1.5.1 (OK) sympy >=0.7.3 : 1.0 (OK)
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (3 by maintainers)

Top Related StackOverflow Question
I also have this issue. By the way, you don’t just close this issue if you don’t a solution. You leave it open in case someone else has a solution.
I have the same issue