我试图安装parsley,这是一个用python编写的解析器,但是我遇到了第一道障碍。我甚至无法安装它。 我在Windows 7上使用cygwin。
这个版本的python: $ python3 -V Python 3.4.2
$ pip install Parsley
Downloading/unpacking Parsley
Running setup.py (path:C:\cygwin64\tmp\pip_build_ds\Parsley\setup.py) egg_info for package Parsley
Installing collected packages: Parsley
Running setup.py install for Parsley
File "C:\Python34\Lib\site-packages\ometa\interp.py", line 252
except ParseError, err:
^
SyntaxError: invalid syntax
File "C:\Python34\Lib\site-packages\ometa\runtime.py", line 484
except ParseError, e:
^
SyntaxError: invalid syntax
File "C:\Python34\Lib\site-packages\ometa\test\test_pymeta.py", line 101
self.assertEqual(g.stuff([17, 0x1f, -2, 0177]), 0177)
^
SyntaxError: invalid token
File "C:\Python34\Lib\site-packages\ometa\vm_builder.py", line 7
print "Gonna compile", expr
^
SyntaxError: Missing parentheses in call to 'print'
File "C:\Python34\Lib\site-packages\parsley.py", line 86
except ParseError, e:
^
SyntaxError: invalid syntax
File "C:\Python34\Lib\site-packages\terml\test\test_terml.py", line 40
Term(Tag('.int.'), 0755, None, None))
^
SyntaxError: invalid token
Successfully installed Parsley
Cleaning up...
然后在python的IDLE:
>>> import parsley
Traceback (most recent call last):
File "<pyshell#5>", line 1, in <module>
import parsley
File "C:\Python34\lib\site-packages\parsley.py", line 86
except ParseError, e:
^
SyntaxError: invalid syntax
我做错了什么?