Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

th3coop
Copy link

@th3coop th3coop commented Jun 24, 2020

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'

samplecode/basic_merging.py Outdated Show resolved Hide resolved
samplecode/basic_features.py Outdated Show resolved Hide resolved
@NotWearingPants
Copy link

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

@th3coop
Copy link
Author

th3coop commented Jun 24, 2020

Added those files.

@th3coop
Copy link
Author

th3coop commented Jun 25, 2020

Thanks for the review @NotWearingPants.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants