title: How can I get rid of ft2font import error from matplotlib on a Windows XP source installation?
body: <p>So today I tried building matplotlib from source (git clone) on a Windows XP box.</p>
  
  <p>First I downloaded and compiled the dependencies (zlib, libpng, freetype2) as per <a href="http://my.opera.com/hearton965/blog/2011/08/04/building-zlib-libpng-with-mingw" rel="nofollow">this</a> blog entry. I then edited <code>setup.cfg</code> to make the matplotlib installation aware of the installations of the dependencies. Lastly, <code>python setup.py build</code> and <code>python setup.py install</code> ran without any errors.</p>
  
  <p>But when I try a simple script for a sample plot, I get this error:</p>
  
  <pre><code>  File "C:\Python27\lib\site-packages\matplotlib\font_manager.py", line 53, in &lt;module&gt;
      from matplotlib import ft2font
  ImportError: DLL load failed: The specified module could not be found.
  </code></pre>
  
  <p>Why is this happening, and how can I fix the issue?</p>
  
  <p>EDIT:</p>
  
  <p>I can find a file called <code>ft2font.pyd</code> in the matplotlib folder in the site-packages folder. This file should be able to be imported as per normal, but somehow it doesn't work.</p>