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

After update with Homebrew, version number is included in TESSDATA_PREFIX #4277

Closed
freebrowser1 opened this issue Jul 3, 2024 · 3 comments
Closed
Labels

Comments

@freebrowser1
Copy link

Current Behavior

After an update, tesseract cannot find the language files anymore, because the path where TESSDATA_PREFIX changes after every update, so I have to change TESSDATA_PREFIX every time.
Now it is /opt/homebrew/Cellar/tesseract/5.4.1 and tomorrow /opt/homebrew/Cellar/tesseract/5.4.2which is very annoying.

Expected Behavior

The TESSDATA_PREFIX environmental variable should not contain a version number.

Suggested Fix

No version number in the TESSDATA_PREFIX path.

tesseract -v

tesseract 5.4.1
leptonica-1.84.1
libgif 5.2.1 : libjpeg 8d (libjpeg-turbo 3.0.0) : libpng 1.6.43 : libtiff 4.6.0 : zlib 1.2.12 : libwebp 1.4.0 : libopenjp2 2.5.2
Found NEON
Found libarchive 3.7.4 zlib/1.2.12 liblzma/5.4.6 bz2lib/1.0.8 liblz4/1.9.4 libzstd/1.5.6
Found libcurl/8.6.0 SecureTransport (LibreSSL/3.3.6) zlib/1.2.12 nghttp2/1.61.0

Operating System

No response

Other Operating System

macOS Sonoma 14.5.

uname -a

Darwin armemac.local 23.5.0 Darwin Kernel Version 23.5.0: Wed May 1 20:12:58 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6000 arm64

Compiler

Pre-compiled by homebrew.

CPU

Apple Silicon M1 (arm64) but on another Macbook which is an Intel i5 with the same OS, Homebrew and the same tesseract version the issue also occurs.

Virtualization / Containers

N/A

Other Information

No response

@stweil
Copy link
Member

stweil commented Jul 3, 2024

Why do you set TESSDATA_PREFIX at all? Normally it should not be necessary for users to set it. And indeed it works on my Mac without any problem when no TESSDATA_PREFIX is set.

And why do you think this is an issue for the tesseract repository although you are using Homebrew?

Please use the Tesseract user forum for questions.

@stweil stweil closed this as completed Jul 3, 2024
@stweil stweil added the question label Jul 3, 2024
stweil added a commit to stweil/tesseract that referenced this issue Jul 3, 2024
… entry (issue tesseract-ocr#4277)

Don't check for a directory, because a symbolic link is also allowed.

Signed-off-by: Stefan Weil <[email protected]>
stweil added a commit to stweil/tesseract that referenced this issue Jul 3, 2024
…esseract-ocr#4277)

Don't check for a directory, because a symbolic link is also allowed.

Signed-off-by: Stefan Weil <[email protected]>
stweil added a commit to stweil/tesseract that referenced this issue Jul 3, 2024
…esseract-ocr#4277)

Don't check for a directory, because a symbolic link is also allowed.

Signed-off-by: Stefan Weil <[email protected]>
stweil added a commit that referenced this issue Jul 3, 2024
…4277)

Don't check for a directory, because a symbolic link is also allowed.

Signed-off-by: Stefan Weil <[email protected]>
@stweil
Copy link
Member

stweil commented Jul 3, 2024

The next release of Tesseract will ignore a TESSDATA_PREFIX which points to a non-existing location. Then running tesseract with your Homebrew configution would print a warning, but work otherwise.

@freebrowser1
Copy link
Author

Indeed tesseract works without TESSDATA_PREFIX environment variable, so this prefix is obsolete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants