title: How do I upgrade kernmagic to fix this ipython error?
body: <p>I recently upgraded my Enthought Python distribution with</p>
  
  <pre><code>sudo easy_install -U ipython
  </code></pre>
  
  <p>However, when I start up ipython with the <code>ipython</code> command, I get an error:</p>
  
  <pre><code>David-Faux-MacBook-Air:core davidfaux$ ipython
  Python 2.7.2 |EPD 7.2-2 (32-bit)| (default, Sep  7 2011, 09:16:50) 
  Type "copyright", "credits" or "license" for more information.
  
  IPython 0.13.1 -- An enhanced Interactive Python.
  ?         -&gt; Introduction and overview of IPython's features.
  %quickref -&gt; Quick reference.
  help      -&gt; Python's own help system.
  object?   -&gt; Details about 'object', use 'object??' for extra details.
  [TerminalIPythonApp] Error in loading extension: kernmagic
  Check your config files in /Users/davidfaux/.ipython/profile_default
  ---------------------------------------------------------------------------
  AttributeError                            Traceback (most recent call last)
  /Library/Frameworks/Python.framework/Versions/7.2/lib/python2.7/site-packages/ipython-0.13.1-py2.7.egg/IPython/core/extensions.pyc in load_extension(self, module_str)
       90                 __import__(module_str)
       91         mod = sys.modules[module_str]
  ---&gt; 92         return self._call_load_ipython_extension(mod)
       93 
       94     def unload_extension(self, module_str):
  
  /Library/Frameworks/Python.framework/Versions/7.2/lib/python2.7/site-packages/ipython-0.13.1-py2.7.egg/IPython/core/extensions.pyc in _call_load_ipython_extension(self, mod)
      122     def _call_load_ipython_extension(self, mod):
      123         if hasattr(mod, 'load_ipython_extension'):
  --&gt; 124             return mod.load_ipython_extension(self.shell)
      125 
      126     def _call_unload_ipython_extension(self, mod):
  
  /Library/Frameworks/Python.framework/Versions/7.2/lib/python2.7/site-packages/kernmagic/__init__.py in load_ipython_extension(ip)
       28 
       29 def load_ipython_extension(ip):
  ---&gt; 30     activate(ip)
       31     activate_aliases(ip)
  
  /Library/Frameworks/Python.framework/Versions/7.2/lib/python2.7/site-packages/kernmagic/__init__.py in activate(ip, *args)
       14             continue
       15         magic_name = name[len('magic_'):]
  ---&gt; 16         ip.shell.define_magic(magic_name, getattr(mymagics, name))
       17 
       18 def activate_aliases(ip, *args):
  
  AttributeError: 'TerminalInteractiveShell' object has no attribute 'shell'
  </code></pre>
  
  <p>I googled around, and many posts I found said to comment out this line in an ipython configuration file.</p>
  
  <pre><code>c.TerminalIPythonApp.extensions = ['kernmagic']
  </code></pre>
  
  <p>I find it sketchy to comment out an ipython file though... later, I found that <code>kernmagic</code> <a href="https://bitbucket.org/robertkern/kernmagic/commits/50acfe7d30b0" rel="noreferrer">fixed the issue</a> with ipython.</p>
  
  <p>How do I upgrade <code>kernmagic</code> in my ipython distribution so that this error goes away?</p>