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

ImportError: dlopen #321

Open
mhluska opened this issue Aug 5, 2023 · 4 comments
Open

ImportError: dlopen #321

mhluska opened this issue Aug 5, 2023 · 4 comments

Comments

@mhluska
Copy link

mhluska commented Aug 5, 2023

Seeing the following issue on a MacBook M2 Max:

ImportError: dlopen(/Users/mhluska/project/env/lib/python3.11/site-packages/tesserocr.cpython-311-darwin.so, 0x0002): symbol not found in flat namespace '__ZN9tesseract11TessBaseAPID1Ev'

Python version 3.11.4

Using venv with tesserocr 2.6.0

Tesseract version 5.3.2

@zdenop
Copy link
Contributor

zdenop commented Aug 5, 2023

You are using tesserocr build against different version of tesseract.

@mhluska
Copy link
Author

mhluska commented Aug 5, 2023

How would I fix the issue? I've tried reinstalling both tesseract and tesserocr. Do I need a specific version of tesseract with this version of tesserocr?

@mhluska
Copy link
Author

mhluska commented Aug 5, 2023

I managed to get it working by installing older versions:

Install tesseract 5.3.1-1 specifically (last known working version):

curl -O https://raw.githubusercontent.com/Homebrew/homebrew-core/8bedbf36570ebcbae090227aed6048f7e08f1c76/Formula/tesseract.rb
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 brew install tesseract.rb
rm tesseract.rb

Install tesserocr v2.6.0:

pip uninstall tesserocr
pip install --no-cache-dir tesserocr==2.6.0

It would be nice to know how to avoid having to do this though.

@zdenop
Copy link
Contributor

zdenop commented Aug 5, 2023

Try to install tesserocr from source instead of pip... (not sure about Mac/brew, but e.g. on Linux you will need the Tesseract and Leptonica dev packages)

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

No branches or pull requests

2 participants