I do not know why this happened. How can I solve it?
In [1]: %matplotlib inline
And I got this:
AttributeError: 'NoneType' object has no attribute 'is_interactive'
In [1]: %matplotlib inline
UnknownBackend Traceback (most recent call last)
<ipython-input-1-2b1da000a957> in <module>()
/Users/wonderful/anaconda/lib/python2.7/site-packages/IPython/core/interactiveshell.pyc in magic(self, arg_s)
2156 magic_name, _, magic_arg_s = arg_s.partition(' ')
2157 magic_name = magic_name.lstrip(prefilter.ESC_MAGIC)
-> 2158 return self.run_line_magic(magic_name, magic_arg_s)
2159
2160
/Users/wonderful/anaconda/lib/python2.7/site-packages/IPython/core/interactiveshell.pyc in run_line_magic(self, magic_name, line)
2077 kwargs['local_ns'] = sys._getframe(stack_depth).f_locals
2078 with self.builtin_trap:
-> 2079 result = fn(*args,**kwargs)
2080 return result
2081
<decorator-gen-104> in matplotlib(self, line)
/Users/wonderful/anaconda/lib/python2.7/site-packages/IPython/core/magic.pyc in <lambda>(f, *a, **k)
186
187 def magic_deco(arg):
189
190 if callable(arg):
/Users/wonderful/anaconda/lib/python2.7/site-packages/IPython/core/magics/pylab.pyc in matplotlib(self, line)
98 print("Available matplotlib backends: %s" % backends_list)
99 else:
101 self._show_matplotlib_backend(args.gui, backend)
102
/Users/wonderful/anaconda/lib/python2.7/site-packages/IPython/core/interactiveshell.pyc in enable_matplotlib(self, gui)
2945 gui, backend = pt.find_gui_and_backend(self.pylab_gui_select)
2946
-> 2947 pt.activate_matplotlib(backend)
2948 pt.configure_inline_support(self, backend)
2949
/Users/wonderful/anaconda/lib/python2.7/site-packages/IPython/core/pylabtools.pyc in activate_matplotlib(backend)
292 matplotlib.rcParams['backend'] = backend
293
295 matplotlib.pyplot.switch_backend(backend)
296
/Users/wonderful/anaconda/lib/python2.7/site-packages/matplotlib/pyplot.py in <module>()
2510
2511
-> 2512 install_repl_displayhook()
2513
2514
/Users/wonderful/anaconda/lib/python2.7/site-packages/matplotlib/pyplot.py in install_repl_displayhook()
163 ipython_gui_name = backend2gui.get(get_backend())
164 if ipython_gui_name:
166 else:
167 _INSTALL_FIG_OBSERVER = True
/Users/wonderful/anaconda/lib/python2.7/site-packages/IPython/terminal/interactiveshell.pyc in enable_gui(self, gui)
450 def enable_gui(self, gui=None):
451 if gui:
453 else:
454 self._inputhook = None
/Users/wonderful/anaconda/lib/python2.7/site-packages/IPython/terminal/pt_inputhooks/__init__.pyc in get_inputhook_func(gui)
36
37 if gui not in backends:
39
40 if gui in aliases:
UnknownBackend: No event loop integration for 'inline'. Supported event loops are: qt, qt4, qt5, gtk, gtk2, gtk3, tk, wx, pyglet, glut, osx
Error in callback <function post_execute at 0x10ad69500> (for post_execute):
AttributeError Traceback (most recent call last)
/Users/wonderful/anaconda/lib/python2.7/site-packages/matplotlib/pyplot.py in post_execute()
145
146 def post_execute():
148 draw_all()
149
AttributeError: 'NoneType' object has no attribute 'is_interactive'
source
share