`tesseract_get_version` returns cached result after version change
See original GitHub issueThe @run_once
decorator on pytesseract.tesseract_get_version()
means that if the version is switched via
pytesseract.pytesseract.tesseract_cmd = 'tesseract5'
for example, after pytesseract.tesseract_get_version()
has been called, it no longer returns correct results.
As a complete example:
import pytesseract
pytesseract.pytesseract.tesseract_cmd = 'Tesseract/tesseract4'
print(pytesseract.get_tesseract_version())
pytesseract.pytesseract.tesseract_cmd = 'Tesseract/tesseract5'
print(pytesseract.get_tesseract_version())
gives the following (even though I have switched from version 4 to version 5)
4.1.3
leptonica-1.78.0
libgif 5.1.4 : libjpeg 8d (libjpeg-turbo 1.4.2) : libpng 1.2.54 : libtiff 4.0.6 : zlib 1.2.11 : libwebp 0.4.4 : libopenjp2 2.3.0
Found AVX512BW
Found AVX512F
Found AVX2
Found AVX
Found FMA
Found SSE
Found libarchive 3.1.2
4.1.3
leptonica-1.78.0
libgif 5.1.4 : libjpeg 8d (libjpeg-turbo 1.4.2) : libpng 1.2.54 : libtiff 4.0.6 : zlib 1.2.11 : libwebp 0.4.4 : libopenjp2 2.3.0
Found AVX512BW
Found AVX512F
Found AVX2
Found AVX
Found FMA
Found SSE
Found libarchive 3.1.2```
Issue Analytics
- State:
- Created 2 years ago
- Comments:8
Top Results From Across the Web
opensemanticsearch/tesseract-ocr-cache
It returns OCR results only if yet cached by former runs of tesseract_cache/tesseract . If the image was not processed by OCR yet...
Read more >Tesseract 4.5 return multiple results for same image structure
Hello everyone i have problem with tess4j with Arabic.trainddata the problem is when i get result two times the results ...
Read more >How to Use Versioning to Update Your Cached WordPress ...
We're now going to show you how to set versions of different types of files to bust your users' cache. Keep in mind...
Read more >Command Line Usage - Tesseract documentation
TESSDATA_PREFIX environment variable should be set to the parent directory of “tessdata” directory. The following command would give the same result as ...
Read more >15 Tuning the Result Cache - Database
This memory pool consists of the SQL query result cache—which stores results of SQL queries—and the PL/SQL function result cache, which stores values...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Apart from the fact that Windows usually has a different package management, yes. All downloads/installers seem to be unofficial though in this case: https://tesseract-ocr.github.io/tessdoc/Downloads.html
DISTRIB_ID=Ubuntu DISTRIB_RELEASE=18.04 It actually is. Thanks, I’ll look for it.
btw, Is it the same procedure for windows to update to tesseract 5.0.0 though?