}

Python 3.6: ply.yacc.YaccError: Unable to build parser

Problem

When you run python setup.py install it fails with

$ python setup.py install

running install
Building lexer and parser tables.
Traceback (most recent call last):
  File "setup.py", line 130, in <module>
    main()
  File "setup.py", line 123, in main
    setup(**skw)
  File "/usr/lib/python3.6/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "setup.py", line 44, in run
    build_tables()
  File "setup.py", line 37, in build_tables
    outputdir='xonsh')
  File "/home/simon/src/gitsome/xonsh/parser.py", line 233, in __init__
    self.parser = yacc.yacc(**yacc_kwargs)
  File "/usr/lib/python3.6/site-packages/ply/yacc.py", line 3424, in yacc
    raise YaccError('Unable to build parser')
ply.yacc.YaccError: Unable to build parser

System info:

$ python 
Python 3.6.0 (default, Jan 16 2017, 12:12:55) 
[GCC 6.3.1 20170109] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ply
>>> ply.__version__
'3.9'

Solution

The problem of this issue is that gitsome does not currently support Python 3.6. Check this pull request comment for updates for more details and status.

Leonardo Lazzaro

Software engineer and technical writer. 10+ years experience in DevOps, Python, and Linux systems.

More articles by Leonardo Lazzaro