Pycparser not getting imported

4.4k Views Asked by At

2.7.11 python pckg for Mac - and installed the same.

Now I am trying to execute a python file
python file1.py

It throws up the error :


File "file1.py", line 107, in from pycparser import parse_file, c_parser, c_ast ImportError: No module named pycparser


How do I install this pycparser module ? can someone please help me here .

2

There are 2 best solutions below

0
On

You Should go to File -> Settings -> Project: -> Project Interpreter and then on right hand side is a green plus and after clicking it add the "pycparser". Of course after instaling pycparser in cmd"pip3 install pycparser".

0
On

It is very simple. you need install pycparser.

pip install pycparser