sirfz / tesserocr

A Python wrapper for the tesseract-ocr API
MIT License
2.02k stars 255 forks source link

Unable to install tesserocr via poetry M1 MacOS #303

Closed drakonhg closed 2 years ago

drakonhg commented 2 years ago

Hey, do you have any ideas why it is not installing on my Mac with M1 chip

 Detected compiler: unix
        building 'tesserocr' extension
        tesserocr.cpp:748:10: fatal error: 'leptonica/allheaders.h' file not found
        #include "leptonica/allheaders.h"
                 ^~~~~~~~~~~~~~~~~~~~~~~~
        1 error generated.
        error: command '/usr/bin/clang' failed with exit code 1
        [end of output]

    note: This error originates from a subprocess, and is likely not a problem with pip.
  error: legacy-install-failure

  × Encountered error while trying to install package.
  ╰─> tesserocr

  note: This is an issue with the package mentioned above, not pip.
  hint: See above for output from the failure.

  at ~/.poetry/lib/poetry/utils/env.py:1195 in _run
      1191│                 output = subprocess.check_output(
      1192│                     cmd, stderr=subprocess.STDOUT, **kwargs
      1193│                 )
      1194│         except CalledProcessError as e:
    → 1195│             raise EnvCommandError(e, input=input_)
      1196│ 
      1197│         return decode(output)
      1198│ 
      1199│     def execute(self, bin, *args, **kwargs):
sirfz commented 2 years ago
tesserocr.cpp:748:10: fatal error: 'leptonica/allheaders.h' file not found

Check the requirements

drakonhg commented 2 years ago
tesserocr.cpp:748:10: fatal error: 'leptonica/allheaders.h' file not found

Check the requirements

Thanks