PyCParser icon indicating copy to clipboard operation
PyCParser copied to clipboard

Can't run an example out of the box

Open rbarzic opened this issue 2 years ago • 0 comments

Steps:

git clone https://github.com/albertz/PyCParser.git cd PyCParser mkvirtualenv -p python2.7 -r ./requirements.txt pycparser ./runcprog.py ./demos/test_interpreter.c

Result:

EXCEPTION Traceback (most recent call last): File "./runcprog.py", line 56, in line: from cparser import State, parse locals: cparser = State = parse = File "/home/roba/work/github/PyCParser/cparser.py", line 14, in line: from .cparser_utils import unicode, long, unichr locals: from = from.cparser_utils = unicode = <type 'unicode'> long = <type 'long'> unichr = ValueError: Attempted relative import in non-package

Is there something to do before trying to use the runcprog.py script ?

rbarzic avatar Sep 16 '21 18:09 rbarzic