Having Issues with SikuliLibrary 2.0.3 and Tesseract on macOS Catalina
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.
@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)?
Did you try brew install [email protected] or brew install [email protected] ?
@dschiller Unfortunately, that doesn't work, it's not so easy to install older versions with brew.
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.