title: Python Matplotlib: "ImportError: cannot import name flatten"
body: <p>I have a fresh install of Ubuntu 13.04 and am trying to use the python library <code>matlibplot</code>. I installed it via <code>sudo apt-get install python-matplotlib</code> and this seemed to be successful. However, then I try to run a python script with <code>import matplotlib</code>, I get the following exception message:</p>
  
  <pre><code>Traceback (most recent call last):
    File "./simulate.py", line 6, in &lt;module&gt;
      import matplotlib
    File "/usr/lib/pymodules/python2.7/matplotlib/__init__.py", line 165, in &lt;module&gt;
      from matplotlib.rcsetup import (defaultParams,
    File "/usr/lib/pymodules/python2.7/matplotlib/rcsetup.py", line 20, in &lt;module&gt;
      from matplotlib.colors import is_color_like
    File "/usr/lib/pymodules/python2.7/matplotlib/colors.py", line 54, in &lt;module&gt;
      import matplotlib.cbook as cbook
    File "/usr/lib/pymodules/python2.7/matplotlib/cbook.py", line 34, in &lt;module&gt;
      import new
    File "/home/rob/Dropbox/Fourth Year/algo/git/new.py", line 3, in &lt;module&gt;
      from pylab import *
    File "/usr/lib/pymodules/python2.7/pylab.py", line 1, in &lt;module&gt;
      from matplotlib.pylab import *
    File "/usr/lib/pymodules/python2.7/matplotlib/pylab.py", line 219, in &lt;module&gt;
      from cbook import flatten, is_string_like, exception_to_str, \
  ImportError: cannot import name flatten
  </code></pre>
  
  <p>This has happened previously (and I was not able to get around it). There does not seem anyone who has had the same problem.</p>
  
  <p>Does anyone know of a solution?</p>