@Vivek_Sharma
The error message “No matching distribution found for PdfWriter” is due to trying to install “PdfWriter” separately using pip. “PdfWriter” is actually a part of the “PyPDF2” library, not a separate package. That’s why pip can’t find a version of “PdfWriter” to install.
“PdfReader”, “PdfWriter”, and “os” are not separate packages that need to be installed. Instead, “PdfReader” and “PdfWriter” are classes within the “PyPDF2” library, and “os” is a built-in Python module (already installed).
If you’re using pip to install the required packages, you only need to install “PyPDF2”. This can be done using the command:
pip install PyPDF2
UPDATE:
Based on the updated PyPDF2 documentation, the correct usage is PdfReader and PdfWriter classes. 1 2