title: Cannot install Matplotlib on Mac
body: <p>I cannot install Matplotlib on Mavericks 10.9.  I have the following error message telling me freetype cannot be built:</p>
  
  <pre><code>    ============================================================================
      Edit setup.cfg to change the build options
  
      BUILDING MATPLOTLIB
                  matplotlib: yes [1.3.1]
                      python: yes [2.7.6 (default, Apr  9 2014, 11:48:52)  [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 [dateutil was not found. It is required for date
                              axis support. pip/easy_install may attempt to
                              install it after matplotlib.]
                     tornado: yes [tornado was not found. It is required for the
                              WebAgg backend. pip/easy_install may attempt to
                              install it after matplotlib.]
                   pyparsing: yes [pyparsing was not found. It is required for
                              mathtext support. pip/easy_install may attempt to
                              install it after matplotlib.]
                       pycxx: yes [Couldn't import.  Using local copy.]
                      libagg: yes [pkg-config information for 'libagg' could not
                              be found. Using local copy.]
                    freetype: no  [The C/C++ header for freetype2 (ft2build.h)
                              could not be found.  You may need to install the
                              development package.]
                         png: yes [pkg-config information for 'libpng' could not
                              be found. Using unknown version.]
  
      OPTIONAL SUBPACKAGES
                 sample_data: yes [installing]
                    toolkits: yes [installing]
                       tests: yes [nose 0.11.1 or later is required to run the
                              matplotlib test suite]
  
      OPTIONAL BACKEND EXTENSIONS
                      macosx: yes [installing, darwin]
                      qt4agg: no  [PyQt4 not found]
                     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
  
      ============================================================================
                              * The following required packages can not be built:
                              * freetype
      Complete output from command python setup.py egg_info:
      ============================================================================
  
  Edit setup.cfg to change the build options
  
  
  
  BUILDING MATPLOTLIB
  
              matplotlib: yes [1.3.1]
  
                  python: yes [2.7.6 (default, Apr  9 2014, 11:48:52)  [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 [dateutil was not found. It is required for date
  
                          axis support. pip/easy_install may attempt to
  
                          install it after matplotlib.]
  
                 tornado: yes [tornado was not found. It is required for the
  
                          WebAgg backend. pip/easy_install may attempt to
  
                          install it after matplotlib.]
  
               pyparsing: yes [pyparsing was not found. It is required for
  
                          mathtext support. pip/easy_install may attempt to
  
                          install it after matplotlib.]
  
                   pycxx: yes [Couldn't import.  Using local copy.]
  
                  libagg: yes [pkg-config information for 'libagg' could not
  
                          be found. Using local copy.]
  
                freetype: no  [The C/C++ header for freetype2 (ft2build.h)
  
                          could not be found.  You may need to install the
  
                          development package.]
  
                     png: yes [pkg-config information for 'libpng' could not
  
                          be found. Using unknown version.]
  
  
  
  OPTIONAL SUBPACKAGES
  
             sample_data: yes [installing]
  
                toolkits: yes [installing]
  
                   tests: yes [nose 0.11.1 or later is required to run the
  
                          matplotlib test suite]
  
  
  
  OPTIONAL BACKEND EXTENSIONS
  
                  macosx: yes [installing, darwin]
  
                  qt4agg: no  [PyQt4 not found]
  
                 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
  
  
  
  ============================================================================
  
                          * The following required packages can not be built:
  
                          * freetype
  
  ----------------------------------------
  Cleaning up...
  Command python setup.py egg_info failed with error code 1 in /private/var/folders/jj/0w0dd3n16jq4g5579g6c7h040000gn/T/pip_build_mc/matplotlib
  Storing debug log for failure in /Users/mc/.pip/pip.log
  </code></pre>
  
  <p>I have followed the instructions <a href="https://stackoverflow.com/questions/20572366/sudo-pip-install-matplotlib-fails-to-find-freetype-headers-os-x-mavericks">here</a> and <a href="https://github.com/rueckstiess/mtools/wiki/matplotlib-Installation-Guide" rel="nofollow noreferrer">here</a> but it still doesn't work.  This is a clean system install and I just installed Python with brew as well.</p>