Skip to content
Related Articles

Related Articles

How to Install “Python-PyPDF2” package on Linux?

View Discussion
Improve Article
Save Article
  • Last Updated : 07 Mar, 2022

PyPDF2 is a Python module for extracting document-specific information, merging PDF files, separating PDF pages, adding watermarks to files, encrypting and decrypting PDF files, and so on. PyPDF2 is a pure python module so it can run on any platform without any platform-related dependencies on any external libraries or packages. So, in this article, we’ll use the PIP manager to install the PyPDF2 package in Python on a Linux operating system. 

Installing PyPDF2 package on Linux using PIP

Requirements:

  1. Python3
  2. Python3-pip

To install the PyPDF2 package in Linux we have to follow the following steps:

Step 1: Setting up Python environment on our Linux operating system. So we’ll use the apt manager to install Python3.

sudo apt-get install python3

Setting-Python-environment

Step 2: Now we install the PIP manager. The PIP manager is a Python package installation program that is used to install and manage Python packages. So for the installation use the following command on the terminal.

sudo apt install python3-pip

Installing-pip-manager

Step 3: Now we will use the PIP manager to install the PyPDF2 package. So to install the PyPDF2 package run the following command on the terminal.

sudo pip3 install PyPDF2 

Installing-PyPDF2

Verifying installation of PyPDF2 package on Linux using PIP

After you’ve installed the package, the next step is to check whether the PyPDF2 is successfully installed or not. So, we’ll only use the terminal to get the information about the installed package (PyPDF2).

python3 -m pip show PyPDF2 

You will get the following output when the PyPDF2 package is successfully installed.

Verifying-PyPDF2

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!