How To Install python3-odfpy on CentOS 8

In this tutorial we learn how to install python3-odfpy on CentOS 8. python3-odfpy is Python library for manipulating OpenDocument files

Introduction

In this tutorial we learn how to install python3-odfpy on CentOS 8.

What is python3-odfpy

Odfpy aims to be a complete API for OpenDocument in Python. Unlike other more convenient APIs, this one is essentially an abstraction layer just above the XML format. The main focus has been to prevent the programmer from creating invalid documents. It has checks that raise an exception if the programmer adds an invalid element, adds an attribute unknown to the grammar, forgets to add a required attribute or adds text to an element that doesn’t allow it. These checks and the API itself were generated from the RelaxNG schema, and then hand-edited. Therefore the API is complete and can handle all ODF constructions, but could be improved in its understanding of data types. This package provides Python 3 build of odfpy.

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

Install python3-odfpy on CentOS 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache

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

sudo yum -y install python3-odfpy

Install python3-odfpy on CentOS 8 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

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

sudo dnf -y install python3-odfpy

How To Uninstall python3-odfpy on CentOS 8

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

sudo dnf remove python3-odfpy

References

Summary

In this tutorial we learn how to install python3-odfpy on CentOS 8 using yum and dnf.