I have tried a lot, but still, I don't know why unable to install Tesserocr
and leptonica
on Mac M1. the error
is here, thanks for your help.
ERROR: Command errored out with exit status 1:
command: /Users/mahdiseify/opt/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/yz/5nlp05fj4_555yk6l3wrwcrc0000gn/T/pip-install-g9egkz3i/tesseract-ocr/setup.py'"'"'; __file__='"'"'/private/var/folders/yz/5nlp05fj4_555yk6l3wrwcrc0000gn/T/pip-install-g9egkz3i/tesseract-ocr/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/yz/5nlp05fj4_555yk6l3wrwcrc0000gn/T/pip-wheel-698gyerl
cwd: /private/var/folders/yz/5nlp05fj4_555yk6l3wrwcrc0000gn/T/pip-install-g9egkz3i/tesseract-ocr/
Complete output (15 lines):
running bdist_wheel
running build
running build_py
file tesseract_ocr.py (for module tesseract_ocr) not found
file tesseract_ocr.py (for module tesseract_ocr) not found
running build_ext
building 'tesseract_ocr' extension
creating build
creating build/temp.macosx-10.9-x86_64-3.8
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/mahdiseify/opt/anaconda3/include -arch x86_64 -I/Users/mahdiseify/opt/anaconda3/include -arch x86_64 -I/Users/mahdiseify/opt/anaconda3/include/python3.8 -c tesseract_ocr.cpp -o build/temp.macosx-10.9-x86_64-3.8/tesseract_ocr.o
tesseract_ocr.cpp:643:10: fatal error: 'leptonica/allheaders.h' file not found
#include "leptonica/allheaders.h"
^~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for tesseract-ocr
This looks like that the leptonica-related includes are not in the includes-path of gcc. Check their location and then extend $C_INCLUDE_PATH accordingly.