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:
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
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
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
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.