conda-forge / tesseract-feedstock

A conda-smithy repository for tesseract.
BSD 3-Clause "New" or "Revised" License
5 stars 17 forks source link

Incoherrent TESSDATA_PREFIX and config placement #48

Open FlyinTeller opened 1 year ago

FlyinTeller commented 1 year ago

Solution to issue cannot be found in the documentation.

Issue

I have created a fresh environment with tessearct==5.3.0 on win64, see installed packages.

I have noticed, that while the *.traineddata are placed in the <envdir>\share\testdata folder, the configs and tessconfigs folders are placed in <envdir>\Library\share\tessdata. The TESSDATA_PREFIX is set to <envdir>\share\tessdata. This results in calls like

 tesseract  tess_5a6u1fl6_input.PNG tess_5a6u1fl6 batch.nochop makebox

will be able to find the traineddata, but not the config files batch.nochop and makebox

I would have expected that there should only be one tessdata folder that contains traineddata and config folders and files so that TESSDATA_PREFIX can correctly point to that location

Installed packages

#
# Name                    Version                   Build  Channel
bzip2                     1.0.8                h8ffe710_4    conda-forge
ca-certificates           2023.5.7             h56e8100_0    conda-forge
jpeg                      9e                   hcfcfb64_3    conda-forge
leptonica                 1.78.0               h688788b_4    conda-forge
lerc                      4.0.0                h63175ca_0    conda-forge
libarchive                3.6.2                h6f8411a_1    conda-forge
libdeflate                1.14                 hcfcfb64_0    conda-forge
libiconv                  1.17                 h8ffe710_0    conda-forge
libpng                    1.6.39               h19919ed_0    conda-forge
libtiff                   4.4.0                hc4f729c_5    conda-forge
libwebp                   1.3.0                hcfcfb64_0    conda-forge
libwebp-base              1.3.0                hcfcfb64_0    conda-forge
libxml2                   2.11.4               hc3477c8_0    conda-forge
libzlib                   1.2.13               hcfcfb64_4    conda-forge
lz4-c                     1.9.4                hcfcfb64_0    conda-forge
lzo                       2.10              he774522_1000    conda-forge
openjpeg                  2.5.0                hc9384bd_1    conda-forge
openssl                   3.1.1                hcfcfb64_1    conda-forge
tesseract                 5.3.0                hcb5f61f_0    conda-forge
ucrt                      10.0.22621.0         h57928b3_0    conda-forge
vc                        14.3                hb25d44b_16    conda-forge
vc14_runtime              14.34.31931         h5081d32_16    conda-forge
vs2015_runtime            14.34.31931         hed1258a_16    conda-forge
xz                        5.2.6                h8d14728_0    conda-forge
zlib                      1.2.13               hcfcfb64_4    conda-forge
zstd                      1.5.2                h12be248_6    conda-forge

Environment info

active environment : test
    active env location : (...)\AppData\Local\mambaforge\envs\test
            shell level : 2
       user config file : (...)\.condarc
 populated config files : (...)\AppData\Local\mambaforge\.condarc
          conda version : 23.1.0
    conda-build version : not installed
         python version : 3.10.10.final.0
       virtual packages : __archspec=1=x86_64
                          __cuda=11.8=0
                          __win=0=0
       base environment : (...)\AppData\Local\mambaforge  (writable)
      conda av data dir : (...)\AppData\Local\mambaforge\etc\conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/win-64
                          https://conda.anaconda.org/conda-forge/noarch
          package cache : (...)\AppData\Local\mambaforge\pkgs
                          (...)\.conda\pkgs
                          (...)\AppData\Local\conda\conda\pkgs
       envs directories : (...)\AppData\Local\mambaforge\envs
                          (...)\.conda\envs
                          (...)\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/23.1.0 requests/2.28.2 CPython/3.10.10 Windows/10 Windows/10.0.19045
          administrator : False
             netrc file : None
           offline mode : False
JoelStansbury commented 1 month ago

I think that #67 should fix the issue, but cannot find a download link to the package artifact to test... Any advice on how to test the package?

carlodri commented 1 week ago

Could you add a test command like the one above, i.e.:

tesseract  eurotext.tif eurotext batch.nochop makebox

using the included test TIFF file?