title: Jupyter Notebook load_ext signature
body: <p>A while ago I found the following <a href="http://ramiro.org/notebook/wikipedia-most-revisions/" rel="noreferrer">website</a>, from which I copied the source code and pasted it into my own <code>jupyter notebook</code>.</p>
  
  <pre><code>%load_ext signature
  %matplotlib inline
  
  import requests
  import helpers
  
  import pandas as pd
  import matplotlib as mpl
  import matplotlib.pyplot as plt
  
  from lxml import html
  from datetime import datetime
  
  # Set style and meta info.
  mpl.style.use('ramiro')
  url = 'https://en.wikipedia.org/wiki/Wikipedia:Database_reports/Pages_with_the_most_revisions'
  end_date = '27 March 2015'
  chartinfo = 'Author: Ramiro Gómez - ramiro.org • Data: ' + url.replace('https://', '')
  infosize = 12
  
  # Extract first wikitable from page
  xpath = '//*[contains(@class, "wikitable")]'
  tree = html.fromstring(requests.get(url).text)
  table = tree.xpath(xpath)[0]
  raw_html = html.tostring(table)
  
  # Create dataframe from html table
  df = pd.read_html(raw_html, header=0, index_col='Page')[0]
  df.index = df.index.map(lambda x: x.replace('_', ' '))
  df.head(10)
  </code></pre>
  
  <p>Now I rediscovered this notebook and wanted to run it. However, it doesn't work:</p>
  
  <pre><code>ImportError                               Traceback (most recent call last)
  &lt;ipython-input-1-cd5561f41831&gt; in &lt;module&gt;()
  ----&gt; 1 get_ipython().magic('load_ext signature')
      2 get_ipython().magic('matplotlib inline')
      3 
      4 import requests
      5 import helpers
  
      /home/xiaolong/development/anaconda3/envs/jupyter/lib/python3.5/site-packages/IPython/core/interactiveshell.py in   magic(self, arg_s)
  2161         magic_name, _, magic_arg_s = arg_s.partition(' ')
  2162         magic_name = magic_name.lstrip(prefilter.ESC_MAGIC)
  -&gt; 2163         return self.run_line_magic(magic_name, magic_arg_s)
  2164 
  2165     #-------------------------------------------------------------------------
  
  /home/xiaolong/development/anaconda3/envs/jupyter/lib/python3.5/site-packages/IPython/core/interactiveshell.py in   run_line_magic(self, magic_name, line)
  2082                 kwargs['local_ns'] = sys._getframe(stack_depth).f_locals
  2083             with self.builtin_trap:
  -&gt; 2084                 result = fn(*args,**kwargs)
  2085             return result
  2086 
  
  &lt;decorator-gen-64&gt; in load_ext(self, module_str)
  
  /home/xiaolong/development/anaconda3/envs/jupyter/lib/python3.5/site-packages/IPython/core/magic.py in &lt;lambda&gt;(f, *a,  **k)
      191     # but it's overkill for just that one bit of state.
      192     def magic_deco(arg):
      --&gt; 193         call = lambda f, *a, **k: f(*a, **k)
      194 
      195         if callable(arg):
  
      /home/xiaolong/development/anaconda3/envs/jupyter/lib/python3.5/site-packages/IPython/core/magics/extension.py in   load_ext(self, module_str)
      64         if not module_str:
      65             raise UsageError('Missing module name.')
      ---&gt; 66         res = self.shell.extension_manager.load_extension(module_str)
      67 
      68         if res == 'already loaded':
  
      /home/xiaolong/development/anaconda3/envs/jupyter/lib/python3.5/site-packages/IPython/core/extensions.py in     load_extension(self, module_str)
      82             if module_str not in sys.modules:
      83                 with prepended_to_syspath(self.ipython_extension_dir):
      ---&gt; 84                     __import__(module_str)
      85             mod = sys.modules[module_str]
      86             if self._call_load_ipython_extension(mod):
  
      ImportError: No module named 'signature'
  </code></pre>
  
  <p>I don't know why this module is missing or what it actually does.</p>
  
  <p>How can I fix this and get the code running?</p>
  
  <p>Additional info:</p>
  
  <p>I have the jupyter notebook in a virtual environment, which has the following packages:</p>
  
  <pre><code># packages in environment at /home/xiaolong/development/anaconda3/envs/jupyter:
  #
  abstract-rendering        0.5.1               np110py35_0    defaults
  alabaster                 0.7.7                    py35_0    defaults
  anaconda                  2.5.0               np110py35_0    defaults
  anaconda-client           1.2.2                    py35_0    defaults
  argcomplete               1.0.0                    py35_1    defaults
  astropy                   1.1.1               np110py35_0    defaults
  atlas                     0.27.0                    &lt;pip&gt;
  babel                     2.2.0                    py35_0    defaults
  beautifulsoup4            4.4.1                    py35_0    defaults
  bitarray                  0.8.1                    py35_0    defaults
  blaze                     0.9.0                     &lt;pip&gt;
  blaze-core                0.9.0                    py35_0    defaults
  bokeh                     0.11.0                   py35_0    defaults
  boto                      2.39.0                   py35_0    defaults
  bottleneck                1.0.0               np110py35_0    defaults
  brewer2mpl                1.4.1                     &lt;pip&gt;
  calysto-prolog            0.8.3                     &lt;pip&gt;
  cffi                      1.2.1                    py35_0    defaults
  clyent                    1.2.0                    py35_0    defaults
  colorama                  0.3.6                    py35_0    defaults
  configobj                 5.0.6                    py35_0    defaults
  cryptography              1.0.2                    py35_0    defaults
  curl                      7.45.0                        0    defaults
  cycler                    0.9.0                    py35_0    defaults
  cython                    0.23.4                   py35_0    defaults
  cytoolz                   0.7.5                    py35_0    defaults
  datashape                 0.5.0                    py35_0    defaults
  decorator                 4.0.6                    py35_0    defaults
  docutils                  0.12                     py35_0    defaults
  dynd                      f641248                   &lt;pip&gt;
  dynd-python               0.7.1                    py35_0    defaults
  emcee                     2.1.0                     &lt;pip&gt;
  et-xmlfile                1.0.1                     &lt;pip&gt;
  et_xmlfile                1.0.1                    py35_0    defaults
  fastcache                 1.0.2                    py35_0    defaults
  flask                     0.10.1                   py35_1    defaults
  fontconfig                2.11.1                        5    defaults
  freetype                  2.5.5                         0    defaults
  futures                   3.0.3                    py35_0    defaults
  ggplot                    0.6.8                     &lt;pip&gt;
  gmpy2                     2.0.7                     &lt;pip&gt;
  greenlet                  0.4.9                    py35_0    defaults
  h5py                      2.5.0               np110py35_4    defaults
  hdf5                      1.8.15.1                      2    defaults
  idna                      2.0                      py35_0    defaults
  ipykernel                 4.2.2                    py35_0    defaults
  ipython                   4.1.1                    py35_0    defaults
  ipython-genutils          0.1.0                     &lt;pip&gt;
  ipython-notebook          4.0.4                    py35_0    defaults
  ipython-qtconsole         4.0.1                    py35_0    defaults
  ipython_genutils          0.1.0                    py35_0    defaults
  ipywidgets                4.1.1                    py35_0    defaults
  itsdangerous              0.24                     py35_0    defaults
  jbig                      2.1                           0    defaults
  jdcal                     1.2                      py35_0    defaults
  jedi                      0.9.0                    py35_0    defaults
  jinja2                    2.8                      py35_0    defaults
  jpeg                      8d                            0    &lt;unknown&gt;
  jsonschema                2.4.0                    py35_0    defaults
  jupyter                   1.0.0                    py35_1    defaults
  jupyter-client            4.1.1                     &lt;pip&gt;
  jupyter-console           4.1.0                     &lt;pip&gt;
  jupyter-core              4.0.6                     &lt;pip&gt;
  jupyter-kernel-test       0.1                       &lt;pip&gt;
  jupyter_client            4.1.1                    py35_0    defaults
  jupyter_console           4.1.0                    py35_0    defaults
  jupyter_core              4.0.6                    py35_0    defaults
  libdynd                   0.7.1                         0    defaults
  libffi                    3.0.13                        0    &lt;unknown&gt;
  libgfortran               1.0                           0    defaults
  libpng                    1.6.17                        0    &lt;unknown&gt;
  libsodium                 1.0.3                         0    defaults
  libtiff                   4.0.6                         1    defaults
  libxml2                   2.9.2                         0    &lt;unknown&gt;
  libxslt                   1.1.28                        0    &lt;unknown&gt;
  llvmlite                  0.8.0                    py35_0    defaults
  lmfit                     0.8.2                     &lt;pip&gt;
  lxml                      3.5.0                    py35_0    defaults
  markupsafe                0.23                     py35_0    defaults
  matplotlib                1.5.1               np110py35_0    defaults
  metakernel                0.11.5                    &lt;pip&gt;
  metakernel-bash           0.11.3                    &lt;pip&gt;
  mistune                   0.7.1                    py35_0    defaults
  mkl                       11.3.1                        0    defaults
  mkl-service               1.1.2                    py35_0    defaults
  multipledispatch          0.4.8                    py35_0    defaults
  nbconvert                 4.1.0                    py35_0    defaults
  nbformat                  4.0.1                    py35_0    defaults
  networkx                  1.11                     py35_0    defaults
  nltk                      3.1                      py35_0    defaults
  nose                      1.3.7                    py35_0    defaults
  notebook                  4.1.0                    py35_0    defaults
  numba                     0.23.1              np110py35_0    defaults
  numexpr                   2.4.6               np110py35_1    defaults
  numpy                     1.10.4                   py35_0    defaults
  octave-kernel             0.13.2                    &lt;pip&gt;
  odo                       0.4.0                    py35_0    defaults
  openblas                  0.2.14                        3    defaults
  openpyxl                  2.3.2                    py35_0    defaults
  openssl                   1.0.2f                        0    defaults
  pandas                    0.17.1              np110py35_0    defaults
  patchelf                  0.8                           0    defaults
  path.py                   8.1.2                    py35_1    defaults
  patsy                     0.4.0               np110py35_0    defaults
  pep8                      1.7.0                    py35_0    defaults
  pexpect                   3.3                      py35_0    defaults
  pickleshare               0.5                      py35_0    defaults
  pillow                    3.1.0                    py35_0    defaults
  pip                       8.0.2                    py35_0    defaults
  ply                       3.8                      py35_0    defaults
  psutil                    3.4.2                    py35_0    defaults
  ptyprocess                0.5                      py35_0    defaults
  py                        1.4.31                   py35_0    defaults
  pyaml                     15.8.2                    &lt;pip&gt;
  pyasn1                    0.1.9                    py35_0    defaults
  pycosat                   0.6.1                    py35_0    defaults
  pycparser                 2.14                     py35_0    defaults
  pycrypto                  2.6.1                    py35_0    defaults
  pycurl                    7.19.5.3                 py35_0    defaults
  pyflakes                  1.0.0                    py35_0    defaults
  pygments                  2.1                      py35_0    defaults
  pymatbridge               0.5.2                     &lt;pip&gt;
  pyopenssl                 0.15.1                   py35_1    defaults
  pyparsing                 2.0.3                    py35_0    defaults
  pyqt                      4.11.4                   py35_1    defaults
  pytables                  3.2.2               np110py35_0    defaults
  pytest                    2.8.5                    py35_0    defaults
  python                    3.5.1                         0    defaults
  python-contrib-nbextensions alpha                     &lt;pip&gt;
  python-dateutil           2.4.2                    py35_0    defaults
  pytz                      2015.7                   py35_0    defaults
  pyyaml                    3.11                     py35_1    defaults
  pyzmq                     15.2.0                   py35_0    defaults
  qt                        4.8.7                         1    defaults
  qtconsole                 4.1.1                    py35_0    defaults
  readline                  6.2                           2    &lt;unknown&gt;
  redis                     2.6.9                         0    &lt;unknown&gt;
  redis-py                  2.10.3                   py35_0    defaults
  requests                  2.9.1                    py35_0    defaults
  rope                      0.9.4                    py35_1    defaults
  rope-py3k                 0.9.4.post1               &lt;pip&gt;
  satlas                    0.1.0b17                  &lt;pip&gt;
  scikit-image              0.11.3              np110py35_0    defaults
  scikit-learn              0.17                np110py35_2    defaults
  scipy                     0.17.0              np110py35_1    defaults
  setuptools                19.6.2                   py35_0    defaults
  simplegeneric             0.8.1                    py35_0    defaults
  sip                       4.16.9                   py35_0    defaults
  six                       1.10.0                   py35_0    defaults
  snowballstemmer           1.2.1                    py35_0    defaults
  sockjs-tornado            1.0.1                    py35_0    defaults
  sphinx                    1.3.5                    py35_0    defaults
  sphinx-rtd-theme          0.1.9                     &lt;pip&gt;
  sphinx_rtd_theme          0.1.9                    py35_0    defaults
  spyder                    2.3.8                    py35_0    defaults
  spyder-app                2.3.8                    py35_0    defaults
  sqlalchemy                1.0.11                   py35_0    defaults
  sqlite                    3.9.2                         0    defaults
  statsmodels               0.6.1               np110py35_0    defaults
  sympy                     0.7.6.1                  py35_0    defaults
  tables                    3.2.2                     &lt;pip&gt;
  terminado                 0.5                      py35_1    defaults
  threadpool                1.3.2                     &lt;pip&gt;
  tk                        8.5.18                        0    &lt;unknown&gt;
  toolz                     0.7.4                    py35_0    defaults
  tornado                   4.3                      py35_0    defaults
  tqdm                      3.8.0                     &lt;pip&gt;
  traitlets                 4.1.0                    py35_0    defaults
  unicodecsv                0.14.1                   py35_0    defaults
  util-linux                2.21                          0    &lt;unknown&gt;
  werkzeug                  0.11.3                   py35_0    defaults
  wheel                     0.29.0                   py35_0    defaults
  xlrd                      0.9.4                    py35_0    defaults
  xlsxwriter                0.8.4                    py35_0    defaults
  xlwt                      1.0.0                    py35_0    defaults
  xz                        5.0.5                         1    defaults
  yaml                      0.1.6                         0    &lt;unknown&gt;
  zeromq                    4.1.3                         0    defaults
  zlib                      1.2.8                         0    &lt;unknown&gt;
  </code></pre>