我试图在我的 Windows 机器上编译 Pyparsing,但出现以下错误:
python setup.py build_ext --inplace
running build_ext
cythoning pyparsing.pyx to pyparsing.c
Error compiling Cython file:
------------------------------------------------------------
...
If C{include} is set to true, the matched expression is also parsed (the
skipped text
and matched expression are returned as a 2-element list). The C{ignore}
argument is used to define grammars (typically quoted strings and comment
s) that
might contain false matches.
"""
def __init__( self, other, include=False, ignore=None, failOn=None ):
^
------------------------------------------------------------
pyparsing.pyx:2764:31: Expected an identifier, found 'include'
Error compiling Cython file:
------------------------------------------------------------
...
def __init__( self, other, include=False, ignore=None, failOn=None ):
super( SkipTo, self ).__init__( other )
self.ignoreExpr = ignore
self.mayReturnEmpty = True
self.mayIndexError = False
self.includeMatch = include
^
------------------------------------------------------------
pyparsing.pyx:2769:28: Expected an identifier or literal
building 'pyparsing' extension
creating build
creating build\temp.win32-2.7
creating build\temp.win32-2.7\Release
C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W
3 /GS- /DNDEBUG -IC:\Python27\include -IC:\Python27\PC /Tcpyparsing.c /Fobuild\t
emp.win32-2.7\Release\pyparsing.obj
pyparsing.c
pyparsing.c(1) : fatal error C1189: #error : Do not use this file, it is the re
sult of a failed Cython compilation.
error: command '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe"' fa
iled with exit status 2
我使用 Microsoft Visual C++ 2008 Express 版本进行了编译,使用的 Pyparsing 模块是最新版本。请问,有谁知道如何使这项工作?