 <p>The problem is in <a href="http://pythonhosted.org/pyparsing/" rel="nofollow">pyparsing</a>:</p> <blockquote> <p>The pyparsing module is an alternative approach to creating and executing simple grammars, vs. the traditional lex/yacc approach, or the use of regular expressions. With pyparsing, you don't need to learn a new syntax for defining grammars or matching expressions - the parsing module provides a library of classes that you use to construct the grammar directly in Python.</p> </blockquote> <p>In order to "construct the grammar directly in Python", pyparsing needs to read the source file (in this case a matplotlib source file) where the grammar is defined. In what would usually just be a bit of harmless extra work, pyparsing is reading not just the matplotlib source file but everything in the stack at the point the grammar is defined, all the way down to the source file where you have your <code>import matplotlib</code>. When it reaches your source file it chokes, because your file indeed is not in UTF-8; 0x96 is the Windows-1252 (and/or Latin-1) encoding for the en dash. This issue (reading too much of the stack) has <a href="https://sourceforge.net/p/pyparsing/code/415/" rel="nofollow">already been fixed</a> by <a href="http://stackoverflow.com/users/165216/paul-mcguire">the author of pyparsing</a> so the fix should be in the next <a href="https://pypi.python.org/pypi/pyparsing" rel="nofollow">release of pyparsing</a> (probably 2.1.8).</p> <p>By the way, matplotlib is defining a pyparsing grammar in order to be able to read fontconfig files, which are a way of configuring fonts used mainly on Linux. So on Windows pyparsing is probably not even required to use matplotlib!</p>