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

Open
simon04 opened this Issue Jan 20, 2017 · 7 comments

Comments

Projects
None yet
6 participants

simon04 commented Jan 20, 2017

Running python setup.py install fails with ply.yacc.YaccError: Unable to build parser.

$ 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'

Edit by donnemartin:

gitsome does not currently support Python 3.6. See this comment for more details and status.

kshitij10496 commented Jan 20, 2017

Even I am facing the same issue with installation on MacOSX Sierra using Python 3.6 as:

$ pip3 install gitsome

Owner

donnemartin commented Jan 23, 2017

@simon04 thanks for the report. I'm not able to reproduce on Python 3.5, I'll switch to 3.6 soon and try it out.

ston3o commented Feb 27, 2017

👍

Got same error.

running install
Building lexer and parser tables.
Traceback (most recent call last):
File "", line 1, in
File "/private/var/folders/9p/0sqt2rlx7bl7wjyglgwz__380000gn/T/pip-d3ze49_6-build/setup.py", line 130, in
main()
File "/private/var/folders/9p/0sqt2rlx7bl7wjyglgwz__380000gn/T/pip-d3ze49_6-build/setup.py", line 123, in main
setup(**skw)
File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/private/var/folders/9p/0sqt2rlx7bl7wjyglgwz__380000gn/T/pip-d3ze49_6-build/setup.py", line 44, in run
build_tables()
File "/private/var/folders/9p/0sqt2rlx7bl7wjyglgwz__380000gn/T/pip-d3ze49_6-build/setup.py", line 37, in build_tables
outputdir='xonsh')
File "/private/var/folders/9p/0sqt2rlx7bl7wjyglgwz__380000gn/T/pip-d3ze49_6-build/xonsh/parser.py", line 233, in init
self.parser = yacc.yacc(**yacc_kwargs)
File "/usr/local/lib/python3.6/site-packages/ply/yacc.py", line 3426, in yacc
raise YaccError('Unable to build parser')
ply.yacc.YaccError: Unable to build parser

----------------------------------------

Command "/usr/local/opt/python3/bin/python3.6 -u -c "import setuptools, tokenize;file='/private/var/folders/9p/0sqt2rlx7bl7wjyglgwz__380000gn/T/pip-d3ze49_6-build/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /var/folders/9p/0sqt2rlx7bl7wjyglgwz__380000gn/T/pip-llgh286q-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/9p/0sqt2rlx7bl7wjyglgwz__380000gn/T/pip-d3ze49_6-build/

+1 on this

Installing collected packages: gitsome
  Running setup.py install for gitsome ... error
    Complete output from command /usr/local/opt/python3/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-g1wkshgw/gitsome/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-iuxg7a_m-record/install-record.txt --single-version-externally-managed --compile:

    running install
    Remove xonsh/parser_table.py
    Building lexer and parser tables.
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/tmp/pip-build-g1wkshgw/gitsome/setup.py", line 129, in <module>
        main()
      File "/private/tmp/pip-build-g1wkshgw/gitsome/setup.py", line 122, in main
        setup(**skw)
      File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/private/tmp/pip-build-g1wkshgw/gitsome/setup.py", line 44, in run
        build_tables()
      File "/private/tmp/pip-build-g1wkshgw/gitsome/setup.py", line 37, in build_tables
        outputdir='xonsh')
      File "/private/tmp/pip-build-g1wkshgw/gitsome/xonsh/parser.py", line 233, in __init__
        self.parser = yacc.yacc(**yacc_kwargs)
      File "/usr/local/lib/python3.6/site-packages/ply/yacc.py", line 3426, in yacc
        raise YaccError('Unable to build parser')
    ply.yacc.YaccError: Unable to build parser

    ----------------------------------------
Command "/usr/local/opt/python3/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-g1wkshgw/gitsome/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-iuxg7a_m-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-build-g1wkshgw/gitsome/
Owner

donnemartin commented Mar 13, 2017

I'm able to duplicate this on 3.6, but not on 3.5. Investigating...

@donnemartin donnemartin changed the title from ply.yacc.YaccError: Unable to build parser to Python 3.6: ply.yacc.YaccError: Unable to build parser Mar 13, 2017

Owner

donnemartin commented Mar 13, 2017

From what I can tell, this seems to be an issue with the parser for Python 3.6. This seems to be the relevant ticket: xonsh/xonsh#1717.

We should move towards completing #25 to bring gitsome up to speed with the latest xonsh.

Unless there's a simple patch that I'm missing, gitsome won't support Python 3.6 until #25 is resolved.

Edit: Added note about Python 3.6 incompatibility to README: 31a46f7

donnemartin added a commit that referenced this issue Mar 25, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment