How To Install python2-pdfminer on CentOS 7

In this tutorial we learn how to install python2-pdfminer on CentOS 7. python2-pdfminer is PDF parser and analyzer

Introduction

In this tutorial we learn how to install python2-pdfminer on CentOS 7.

What is python2-pdfminer

PDFMiner is a tool for extracting information from PDF documents. Unlike other PDF-related tools, it focuses entirely on getting and analyzing text data. PDFMiner allows to obtain the exact location of texts in a page, as well as other information such as fonts or lines. It includes a PDF converter that can transform PDF files into other text formats (such as HTML). It has an extensible PDF parser that can be used for other purposes instead of text analysis. This is actually pdfminer.six, a backwards-compatible fork of PDFMiner using six for Python 2+3 compatibility.

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

Install python2-pdfminer on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

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

sudo yum -y install python2-pdfminer

Install python2-pdfminer on CentOS 7 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 python2-pdfminer using dnf by running the following command:

sudo dnf -y install python2-pdfminer

How To Uninstall python2-pdfminer on CentOS 7

To uninstall only the python2-pdfminer package we can use the following command:

sudo dnf remove python2-pdfminer

References

Summary

In this tutorial we learn how to install python2-pdfminer on CentOS 7 using yum and dnf.