Mac M1 上的 Tesserocr 安装
Tesserocr installation on Mac M1
我已经尝试了很多,但我仍然不知道为什么无法在 Mac M1 上安装 Tesserocr
和 leptonica
。 error
来了,感谢您的帮助。
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
这看起来与 leptonica 相关的包含不在 gcc 的包含路径中。检查他们的位置,然后扩展
$C_INCLUDE_PATH 相应地。
我已经尝试了很多,但我仍然不知道为什么无法在 Mac M1 上安装 Tesserocr
和 leptonica
。 error
来了,感谢您的帮助。
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
这看起来与 leptonica 相关的包含不在 gcc 的包含路径中。检查他们的位置,然后扩展 $C_INCLUDE_PATH 相应地。