PyPDF4 icon indicating copy to clipboard operation
PyPDF4 copied to clipboard

Fix 'ModuleNotFoundError: No module named 'pypdf'' when running samp…

Open th3coop opened this issue 5 years ago • 3 comments

Was taking this module for a trial run and found the sample code wasn't working. PR to resolve the error.

Repro:

  • run the recommend command from the repo root python3 ./samplecode/basic_features.py
  • get the following error:
 > python  .\samplecode\basic_features.py
Traceback (most recent call last):
  File ".\samplecode\basic_features.py", line 11, in <module>
    from pypdf.pdf import PdfFileReader, PdfFileWriter
ModuleNotFoundError: No module named 'pypdf'

th3coop avatar Jun 24 '20 04:06 th3coop

Why not also fix the other 2 samples? (PDFComments2XL.py & MergingComments.py)

They both just have import pypdf as PDF instead of import PyPDF4 as PDF

SnirBroshi avatar Jun 24 '20 06:06 SnirBroshi

Added those files.

th3coop avatar Jun 24 '20 18:06 th3coop

Thanks for the review @NotWearingPants.

th3coop avatar Jun 25 '20 16:06 th3coop