-
Notifications
You must be signed in to change notification settings - Fork 255
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
Comments
You are using tesserocr build against different version of tesseract. |
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? |
I managed to get it working by installing older versions: Install tesseract 5.3.1-1 specifically (last known working version):
Install tesserocr v2.6.0:
It would be nice to know how to avoid having to do this though. |
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) |
Using tesseract installed from homebrew, I just successfully installed and imported tesserocr from source. First use these environment variables so that pip can locate the headers and libraries of tesseract: CFLAGS=-I/opt/homebrew/include
LDFLAGS=-L/opt/homebrew/lib
PKG_CONFIG_PATH=/opt/homebrew/lib/pkgconfig
CPLUS_INCLUDE_PATH=/opt/homebrew/Cellar/leptonica/1.85.0/include:/opt/homebrew/include
CPPFLAGS=-I/opt/homebrew/include
LIBRARY_PATH=/opt/homebrew/lib (It is very possible that only a a subset of these environment variables will already do. But I am not sure, so I included all of these) Then clone this repo into your machine, globally search for pip install . --no-binary :all: Then I can successfully print the result of My setting:
|
Seeing the following issue on a MacBook M2 Max:
Python version 3.11.4
Using venv with tesserocr 2.6.0
Tesseract version 5.3.2
The text was updated successfully, but these errors were encountered: