Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Cannot import pdftotext lib #10347

Unanswered
devstknco asked this question in General
Discussion options

I have added pdftotext to my empty project which doesn't show any issue. But the import of pdftotext fails with

Traceback (most recent call last): File "/Users/job/tmp/cpp-test/py-proj/main.py", line 1, in <module> import pdftotext ImportError: dlopen(/Users/job/Library/Caches/pypoetry/virtualenvs/py-proj-MwQLW4NT-py3.12/lib/python3.12/site-packages/pdftotext.cpython-312-darwin.so, 0x0002): Library not loaded: /opt/homebrew/opt/poppler/lib/libpoppler-cpp.1.dylib Referenced from: <28235015-8AF0-3ACA-8C71-91EE14C17972> /Users/job/Library/Caches/pypoetry/virtualenvs/py-proj-MwQLW4NT-py3.12/lib/python3.12/site-packages/pdftotext.cpython-312-darwin.so Reason: tried: '/opt/homebrew/opt/poppler/lib/libpoppler-cpp.1.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/poppler/lib/libpoppler-cpp.1.dylib' (no such file), '/opt/homebrew/opt/poppler/lib/libpoppler-cpp.1.dylib' (no such file), '/opt/homebrew/Cellar/poppler/25.04.0/lib/libpoppler-cpp.1.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/poppler/25.04.0/lib/libpoppler-cpp.1.dylib' (no such file), '/opt/homebrew/Cellar/poppler/25.04.0/lib/libpoppler-cpp.1.dylib' (no such file)

It looks like that it is linked to the wrong poppler lib. /System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/poppler/lib/ contains libpoppler-cpp.2.dylib but not libpoppler-cpp.1.dylib.

If I install pdftotextwith pip it seems to work w/o problems.

I assumed the version is somehow cached (the problem occurred after I have upgraded poppler). But poetry cache clear --all PyPIdid not resolve the issue. Does anybody know where the version number is stored?

Any help is appreciated.

`$> poetry debug info

Poetry
Version: 2.1.2
Python: 3.13.3

Virtualenv
Python: 3.12.10
Implementation: CPython
Path: /Users/job/Library/Caches/pypoetry/virtualenvs/py-proj-MwQLW4NT-py3.12
Executable: /Users/job/Library/Caches/pypoetry/virtualenvs/py-proj-MwQLW4NT-py3.12/bin/python
Valid: True

Base
Platform: darwin
OS: posix
Python: 3.12.10
Path: /Users/job/.pyenv/versions/3.12.10
Executable: /Users/job/.pyenv/versions/3.12.10/bin/python3.12`

OS: macOS Sequoia 15.4.1
poppler: stable 25.04.0 (bottled), HEAD

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant
Morty Proxy This is a proxified and sanitized view of the page, visit original site.