How To Install python3-sqlparse on Rocky Linux 8

In this tutorial we learn how to install python3-sqlparse on Rocky Linux 8. python3-sqlparse is Non-validating SQL parser for Python

Introduction

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

What is python3-sqlparse

sqlparse is a tool for parsing SQL strings. It can generate pretty-printed renderings of SQL in various formats. It is a python module, together with a command-line tool.

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

Install python3-sqlparse 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-sqlparse using dnf by running the following command:

sudo dnf -y install python3-sqlparse

Install python3-sqlparse 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-sqlparse using yum by running the following command:

sudo yum -y install python3-sqlparse

How To Uninstall python3-sqlparse on Rocky Linux 8

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

sudo dnf remove python3-sqlparse

python3-sqlparse Package Contents on Rocky Linux 8

/usr/bin/sqlformat
/usr/lib/python3.6/site-packages/sqlparse
/usr/lib/python3.6/site-packages/sqlparse-0.2.4-py3.6.egg-info
/usr/lib/python3.6/site-packages/sqlparse-0.2.4-py3.6.egg-info/PKG-INFO
/usr/lib/python3.6/site-packages/sqlparse-0.2.4-py3.6.egg-info/SOURCES.txt
/usr/lib/python3.6/site-packages/sqlparse-0.2.4-py3.6.egg-info/dependency_links.txt
/usr/lib/python3.6/site-packages/sqlparse-0.2.4-py3.6.egg-info/entry_points.txt
/usr/lib/python3.6/site-packages/sqlparse-0.2.4-py3.6.egg-info/top_level.txt
/usr/lib/python3.6/site-packages/sqlparse/__init__.py
/usr/lib/python3.6/site-packages/sqlparse/__main__.py
/usr/lib/python3.6/site-packages/sqlparse/__pycache__
/usr/lib/python3.6/site-packages/sqlparse/__pycache__/__init__.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/sqlparse/__pycache__/__init__.cpython-36.pyc
/usr/lib/python3.6/site-packages/sqlparse/__pycache__/__main__.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/sqlparse/__pycache__/__main__.cpython-36.pyc
/usr/lib/python3.6/site-packages/sqlparse/__pycache__/cli.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/sqlparse/__pycache__/cli.cpython-36.pyc
/usr/lib/python3.6/site-packages/sqlparse/__pycache__/compat.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/sqlparse/__pycache__/compat.cpython-36.pyc
/usr/lib/python3.6/site-packages/sqlparse/__pycache__/exceptions.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/sqlparse/__pycache__/exceptions.cpython-36.pyc
/usr/lib/python3.6/site-packages/sqlparse/__pycache__/formatter.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/sqlparse/__pycache__/formatter.cpython-36.pyc
/usr/lib/python3.6/site-packages/sqlparse/__pycache__/keywords.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/sqlparse/__pycache__/keywords.cpython-36.pyc
/usr/lib/python3.6/site-packages/sqlparse/__pycache__/lexer.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/sqlparse/__pycache__/lexer.cpython-36.pyc
/usr/lib/python3.6/site-packages/sqlparse/__pycache__/sql.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/sqlparse/__pycache__/sql.cpython-36.pyc
/usr/lib/python3.6/site-packages/sqlparse/__pycache__/tokens.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/sqlparse/__pycache__/tokens.cpython-36.pyc
/usr/lib/python3.6/site-packages/sqlparse/__pycache__/utils.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/sqlparse/__pycache__/utils.cpython-36.pyc
/usr/lib/python3.6/site-packages/sqlparse/cli.py
/usr/lib/python3.6/site-packages/sqlparse/compat.py
/usr/lib/python3.6/site-packages/sqlparse/engine
/usr/lib/python3.6/site-packages/sqlparse/engine/__init__.py
/usr/lib/python3.6/site-packages/sqlparse/engine/__pycache__
/usr/lib/python3.6/site-packages/sqlparse/engine/__pycache__/__init__.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/sqlparse/engine/__pycache__/__init__.cpython-36.pyc
/usr/lib/python3.6/site-packages/sqlparse/engine/__pycache__/filter_stack.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/sqlparse/engine/__pycache__/filter_stack.cpython-36.pyc
/usr/lib/python3.6/site-packages/sqlparse/engine/__pycache__/grouping.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/sqlparse/engine/__pycache__/grouping.cpython-36.pyc
/usr/lib/python3.6/site-packages/sqlparse/engine/__pycache__/statement_splitter.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/sqlparse/engine/__pycache__/statement_splitter.cpython-36.pyc
/usr/lib/python3.6/site-packages/sqlparse/engine/filter_stack.py
/usr/lib/python3.6/site-packages/sqlparse/engine/grouping.py
/usr/lib/python3.6/site-packages/sqlparse/engine/statement_splitter.py
/usr/lib/python3.6/site-packages/sqlparse/exceptions.py
/usr/lib/python3.6/site-packages/sqlparse/filters
/usr/lib/python3.6/site-packages/sqlparse/filters/__init__.py
/usr/lib/python3.6/site-packages/sqlparse/filters/__pycache__
/usr/lib/python3.6/site-packages/sqlparse/filters/__pycache__/__init__.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/sqlparse/filters/__pycache__/__init__.cpython-36.pyc
/usr/lib/python3.6/site-packages/sqlparse/filters/__pycache__/aligned_indent.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/sqlparse/filters/__pycache__/aligned_indent.cpython-36.pyc
/usr/lib/python3.6/site-packages/sqlparse/filters/__pycache__/others.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/sqlparse/filters/__pycache__/others.cpython-36.pyc
/usr/lib/python3.6/site-packages/sqlparse/filters/__pycache__/output.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/sqlparse/filters/__pycache__/output.cpython-36.pyc
/usr/lib/python3.6/site-packages/sqlparse/filters/__pycache__/reindent.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/sqlparse/filters/__pycache__/reindent.cpython-36.pyc
/usr/lib/python3.6/site-packages/sqlparse/filters/__pycache__/right_margin.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/sqlparse/filters/__pycache__/right_margin.cpython-36.pyc
/usr/lib/python3.6/site-packages/sqlparse/filters/__pycache__/tokens.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/sqlparse/filters/__pycache__/tokens.cpython-36.pyc
/usr/lib/python3.6/site-packages/sqlparse/filters/aligned_indent.py
/usr/lib/python3.6/site-packages/sqlparse/filters/others.py
/usr/lib/python3.6/site-packages/sqlparse/filters/output.py
/usr/lib/python3.6/site-packages/sqlparse/filters/reindent.py
/usr/lib/python3.6/site-packages/sqlparse/filters/right_margin.py
/usr/lib/python3.6/site-packages/sqlparse/filters/tokens.py
/usr/lib/python3.6/site-packages/sqlparse/formatter.py
/usr/lib/python3.6/site-packages/sqlparse/keywords.py
/usr/lib/python3.6/site-packages/sqlparse/lexer.py
/usr/lib/python3.6/site-packages/sqlparse/sql.py
/usr/lib/python3.6/site-packages/sqlparse/tokens.py
/usr/lib/python3.6/site-packages/sqlparse/utils.py
/usr/share/doc/python3-sqlparse
/usr/share/doc/python3-sqlparse/AUTHORS
/usr/share/doc/python3-sqlparse/CHANGELOG
/usr/share/doc/python3-sqlparse/README.rst
/usr/share/licenses/python3-sqlparse
/usr/share/licenses/python3-sqlparse/LICENSE

References

Summary

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