<p>mathdom0.8(安装模块<code>mathml</code>)<a href="http://sourceforge.net/mailarchive/message.php?msg_id=21136268" rel="nofollow">works only with the older pyparsing 1.4.2</a>。
下面是一种用旧版本覆盖<code>pyparsing</code>的方法,只影响<code>mathml</code>。在Windows 7上的Python 2.7上测试:</p>
<ul>
<li>下载并解压缩<a href="http://pypi.python.org/packages/source/m/mathdom/mathdom-0.8.tar.gz#md5=9cc9f378198b44a1bb1c9069167f1ded" rel="nofollow">MathDOM 0.8</a>。在</li>
<li>下载<a href="http://pyparsing.svn.sourceforge.net/viewvc/pyparsing/src/pyparsing.py?revision=68&pathrev=68" rel="nofollow">revision 68 of ^{<cd4>}</a>(根据SVN commit消息,版本1.4.2,尽管存储库中没有标记),并将其保存在提取的<code>mathdom-0.8/mathml</code>文件夹中。这将优先于已安装的<code>pyparsing</code>,但仅限于<code>mathml</code>包。在</li>
<li>导航到<code>mathdom-0.8/</code>并安装(例如<code>python setup.py install</code>或{<cd10>},可能附加<code> prefix=$HOME/usr</code>或类似的东西)。在</li>
<li><p>使用<code>python -c "from mathml import termparser"</code>进行测试;它应该在之前使用<code>AttributeError: 'NoneType' object has no attribute 'setParseAction'</code>失败的地方成功。在</p>
<p>您还可以验证<code>python -c "from mathml import pyparsing; print pyparsing.__version__"</code>打印<code>1.4.2</code>,而{<cd16>}打印{<cd17>}。</p></li>
</ul>
<p>希望这有帮助!在</p>