简体   繁体   English

在 Mac M1 上安装 Tesserocr

[英]Tesserocr installation on Mac M1

I have tried a lot, but still, I don't know why unable to install Tesserocr and leptonica on Mac M1.我已经尝试了很多,但我仍然不知道为什么无法在 Mac M1 上安装Tesserocrleptonica the error is here, thanks for your help. 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

This looks like that the leptonica-related includes are not in the includes-path of gcc.这看起来与 leptonica 相关的包含不在 gcc 的包含路径中。 Check their location and then extend $C_INCLUDE_PATH accordingly.检查它们的位置,然后相应地扩展 $C_INCLUDE_PATH。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM