Skip to content

No module named 'pkg_resources' #113

@zacharysyoung

Description

@zacharysyoung

Wanting to try the CMap tutorial I installed latest with pip3 install pdfreader, and tried the first code example:

from pdfreader import PDFDocument

fd = open("input.pdf", "rb")
doc = PDFDocument(fd)

which failed with:

Traceback (most recent call last):
  File "main.py", line 1, in <module>
    from pdfreader import PDFDocument
  File "~/Library/Python/3.12/lib/python/site-packages/pdfreader/__init__.py", line 3, in <module>
    from .viewer import SimplePDFViewer, PageDoesNotExist
  File "~/Library/Python/3.12/lib/python/site-packages/pdfreader/viewer/__init__.py", line 5, in <module>
    from .simple import SimplePDFViewer
  File "~/Library/Python/3.12/lib/python/site-packages/pdfreader/viewer/simple.py", line 6, in <module>
    from ..codecs.decoder import Decoder, default_decoder
  File "~/Library/Python/3.12/lib/python/site-packages/pdfreader/codecs/decoder.py", line 3, in <module>
    import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions