title: libpng version incompatibility in fresh installation of IPython
body: <p>I used <a href="http://www.lowindata.com/2013/installing-scientific-python-on-mac-os-x/" rel="noreferrer">this guide</a> to install the "scientific stack" for Python (OSX 10.9.2, brewed Python 2.7.6, IPython 2.0, matplotlib 1.3.1, libpng 1.6.10). Everything was looking good.</p>
  
  <p>However, trying to run a simple plot in IPython's notebook environment with <code>--pylab=inline</code> gives me this error:</p>
  
  <p><code>/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/IPython/core/formatters.py:239: FormatterWarning: Exception in image/png formatter: Could not create write struct
      FormatterWarning,</code></p>
  
  <p>And in the terminal it says: <code>libpng warning: Application built with libpng-1.5.17 but running with 1.6.10</code></p>
  
  <p>I have no other libpng installed as far as I can tell. I tried deleting all files beginning with <code>libpng</code> from <code>/usr/local/</code> and reinstalling everything, to no avail. The output from building matplotlib (<code>pip install matplotlib</code>) contains:</p>
  
  <pre><code>BUILDING MATPLOTLIB
              matplotlib: yes [1.3.1]
                  python: yes [2.7.6 (default, Mar 16 2014, 15:04:47)  [GCC
                          4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.38)]]
                platform: yes [darwin]
  
  REQUIRED DEPENDENCIES AND EXTENSIONS
                   numpy: yes [version 1.8.1]
                dateutil: yes [using dateutil version 2.2]
                 tornado: yes [using tornado version 3.2]
               pyparsing: yes [using pyparsing version 2.0.1]
                   pycxx: yes [Couldn't import.  Using local copy.]
                  libagg: yes [pkg-config information for 'libagg' could not
                          be found. Using local copy.]
                freetype: yes [version 17.2.11]
                     png: yes [version 1.6.10]
  
  OPTIONAL SUBPACKAGES
             sample_data: yes [installing]
                toolkits: yes [installing]
                   tests: yes [using nose version 1.3.1]
  
  OPTIONAL BACKEND EXTENSIONS
                  macosx: yes [installing, darwin]
                  qt4agg: yes [installing, Qt: 4.8.6, PyQt4: 4.10.4]
                 gtk3agg: no  [Requires pygobject to be installed.]
               gtk3cairo: no  [Requires cairo to be installed.]
                  gtkagg: no  [Requires pygtk]
                   tkagg: yes [installing, version 81008]
                   wxagg: no  [requires wxPython]
                     gtk: no  [Requires pygtk]
                     agg: yes [installing]
                   cairo: no  [cairo not found]
               windowing: no  [Microsoft Windows only]
  
  OPTIONAL LATEX DEPENDENCIES
                  dvipng: no
             ghostscript: no
                   latex: no
                 pdftops: no
  </code></pre>
  
  <p>So it seems to me matplotlib should be compiled against libpng 1.6.10? Can someone help me figure out what's going on?</p>