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

Having Issues with SikuliLibrary 2.0.3 and Tesseract on macOS Catalina #180

Open
dschiller opened this issue Nov 14, 2022 · 4 comments
Open

Comments

@dschiller
Copy link

dschiller commented Nov 14, 2022

See https://github.com/RaiMan/SikuliX1/wiki/macOS-Linux:-Support-libraries-for-Tess4J-Tesseract-4-OCR

I did install tesseract via brew install tessearct but it still doesn't work with:

org.sikuli.script.SikuliXception: OCR: start: Tesseract library problems: Unable to load library 'tesseract':
dlopen(libtesseract.dylib, 9): image not found
dlopen(libtesseract.dylib, 9): image not found
Native library (darwin/libtesseract.dylib) not found in resource path (/Library/Python/3.8/site-packages/SikuliLibrary/lib/SikuliLibrary.jar)

I then put the libtesseract.dylib directly inside SikuliLibrary.jar via

cd /Library/Python/3.8/site-packages/SikuliLibrary/lib && mkdir darwin && jar uf SikuliLibrary.jar darwin && cp /usr/local/Cellar/tesseract/5.2.0/lib/libtesseract.5.dylib darwin/libtesseract.dylib && jar uf SikuliLibrary.jar darwin/libtesseract.dylib && jar tf SikuliLibrary.jar && rm -rf darwin

That also doesn't work and fails with

org.sikuli.script.SikuliXception: OCR: start: Tesseract library problems: Error looking up function 'TessBaseAPIRecognizeForChopTest': dlsym(0x7f813f572020, TessBaseAPIRecognizeForChopTest): symbol not found

tessearct -v results in

tesseract 5.2.0
 leptonica-1.82.0
  libgif 5.2.1 : libjpeg 8d (libjpeg-turbo 2.1.3) : libpng 1.6.38 : libtiff 4.4.0 : zlib 1.2.11 : libwebp 1.2.4 : libopenjp2 2.5.0
 Found AVX512BW
 Found AVX512F
 Found AVX2
 Found AVX
 Found FMA
 Found SSE4.1
 Found libarchive 3.6.1 zlib/1.2.11 liblzma/5.2.5 bz2lib/1.0.6 liblz4/1.9.3 libzstd/1.5.2
 Found libcurl/7.64.1 SecureTransport (LibreSSL/2.8.3) zlib/1.2.11 nghttp2/1.39.2

Any help appreciated.

@plaurent
Copy link

@dschiller I'm having this issue too. The function TessBaseAPIRecognizeForChopTest does not appear to be in Tesseract 5 that is installed by brew, only in Tesseract 4.
Do you know of any easy way to get brew to install Tesseract 4 (4.1.0 or perhaps even 4.4.0)?

@dschiller
Copy link
Author

Did you try brew install [email protected] or brew install [email protected] ?

@plaurent
Copy link

@dschiller Unfortunately, that doesn't work, it's not so easy to install older versions with brew.

@dschiller
Copy link
Author

Yeah, just figured that out as well. It seems one need to use the brew extract command. But it seems not to be that straight forward.

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