title: Jupyter Notebooks - checking library versions and testing for them
body: <p>I'm currently testing some installs on Jupyter notebooks and I want to check the installed version of particular libraries/modules (e.g. numpy) and then run a test to confirm that version, preferably using doctest.</p>
  <p>Example:</p>
  <pre><code>! python3 -m pip install numpy
  &lt;check installed version&gt;
  &lt;test version using doctest&gt;
  </code></pre>
  <p>Any ideas appreciated.</p>
  <p>Edit: this is being done under Linux, not Windows.</p>