How To Install python3-pycparser on Rocky Linux 8

In this tutorial we learn how to install python3-pycparser on Rocky Linux 8. python3-pycparser is C parser and AST generator written in Python

Introduction

In this tutorial we learn how to install python3-pycparser on Rocky Linux 8.

What is python3-pycparser

pycparser is a complete parser for the C language, written in pure Python. It is a module designed to be easily integrated into applications that need to parse C source code.

We can use yum or dnf to install python3-pycparser on Rocky Linux 8. In this tutorial we discuss both methods but you only need to choose one of method to install python3-pycparser.

Install python3-pycparser on Rocky Linux 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

After updating yum database, We can install python3-pycparser using dnf by running the following command:

sudo dnf -y install python3-pycparser

Install python3-pycparser on Rocky Linux 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install python3-pycparser using yum by running the following command:

sudo yum -y install python3-pycparser

How To Uninstall python3-pycparser on Rocky Linux 8

To uninstall only the python3-pycparser package we can use the following command:

sudo dnf remove python3-pycparser

python3-pycparser Package Contents on Rocky Linux 8

/usr/lib/python3.6/site-packages/pycparser
/usr/lib/python3.6/site-packages/pycparser-2.14-py3.6.egg-info
/usr/lib/python3.6/site-packages/pycparser-2.14-py3.6.egg-info/PKG-INFO
/usr/lib/python3.6/site-packages/pycparser-2.14-py3.6.egg-info/SOURCES.txt
/usr/lib/python3.6/site-packages/pycparser-2.14-py3.6.egg-info/dependency_links.txt
/usr/lib/python3.6/site-packages/pycparser-2.14-py3.6.egg-info/top_level.txt
/usr/lib/python3.6/site-packages/pycparser/__init__.py
/usr/lib/python3.6/site-packages/pycparser/__pycache__
/usr/lib/python3.6/site-packages/pycparser/__pycache__/__init__.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pycparser/__pycache__/__init__.cpython-36.pyc
/usr/lib/python3.6/site-packages/pycparser/__pycache__/_ast_gen.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pycparser/__pycache__/_ast_gen.cpython-36.pyc
/usr/lib/python3.6/site-packages/pycparser/__pycache__/_build_tables.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pycparser/__pycache__/_build_tables.cpython-36.pyc
/usr/lib/python3.6/site-packages/pycparser/__pycache__/ast_transforms.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pycparser/__pycache__/ast_transforms.cpython-36.pyc
/usr/lib/python3.6/site-packages/pycparser/__pycache__/c_ast.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pycparser/__pycache__/c_ast.cpython-36.pyc
/usr/lib/python3.6/site-packages/pycparser/__pycache__/c_generator.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pycparser/__pycache__/c_generator.cpython-36.pyc
/usr/lib/python3.6/site-packages/pycparser/__pycache__/c_lexer.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pycparser/__pycache__/c_lexer.cpython-36.pyc
/usr/lib/python3.6/site-packages/pycparser/__pycache__/c_parser.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pycparser/__pycache__/c_parser.cpython-36.pyc
/usr/lib/python3.6/site-packages/pycparser/__pycache__/lextab.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pycparser/__pycache__/lextab.cpython-36.pyc
/usr/lib/python3.6/site-packages/pycparser/__pycache__/plyparser.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pycparser/__pycache__/plyparser.cpython-36.pyc
/usr/lib/python3.6/site-packages/pycparser/__pycache__/yacctab.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/pycparser/__pycache__/yacctab.cpython-36.pyc
/usr/lib/python3.6/site-packages/pycparser/_ast_gen.py
/usr/lib/python3.6/site-packages/pycparser/_build_tables.py
/usr/lib/python3.6/site-packages/pycparser/_c_ast.cfg
/usr/lib/python3.6/site-packages/pycparser/ast_transforms.py
/usr/lib/python3.6/site-packages/pycparser/c_ast.py
/usr/lib/python3.6/site-packages/pycparser/c_generator.py
/usr/lib/python3.6/site-packages/pycparser/c_lexer.py
/usr/lib/python3.6/site-packages/pycparser/c_parser.py
/usr/lib/python3.6/site-packages/pycparser/lextab.py
/usr/lib/python3.6/site-packages/pycparser/plyparser.py
/usr/lib/python3.6/site-packages/pycparser/yacctab.py
/usr/share/doc/python3-pycparser
/usr/share/doc/python3-pycparser/examples
/usr/share/doc/python3-pycparser/examples/c-to-c.py
/usr/share/doc/python3-pycparser/examples/c_files
/usr/share/doc/python3-pycparser/examples/c_files/funky.c
/usr/share/doc/python3-pycparser/examples/c_files/hash.c
/usr/share/doc/python3-pycparser/examples/c_files/memmgr.c
/usr/share/doc/python3-pycparser/examples/c_files/memmgr.h
/usr/share/doc/python3-pycparser/examples/c_files/year.c
/usr/share/doc/python3-pycparser/examples/cdecl.py
/usr/share/doc/python3-pycparser/examples/explore_ast.py
/usr/share/doc/python3-pycparser/examples/func_calls.py
/usr/share/doc/python3-pycparser/examples/func_defs.py
/usr/share/doc/python3-pycparser/examples/rewrite_ast.py
/usr/share/doc/python3-pycparser/examples/using_cpp_libc.py
/usr/share/doc/python3-pycparser/examples/using_gcc_E_libc.py
/usr/share/licenses/python3-pycparser
/usr/share/licenses/python3-pycparser/LICENSE

References

Summary

In this tutorial we learn how to install python3-pycparser on Rocky Linux 8 using yum and dnf.