python - gcc error on install of tesseract-ocr -
i trying run following code on mac.
import image enter code here`import pytesseract im = image.open('test.png') print pytesseract.image_to_string(im) following question here: pytesseract-no such file or directory error need install tesseract-ocr
but when try pip install tesseract-ocr following errors:
creating build/temp.macosx-10.5-x86_64-2.7 gcc -fno-strict-aliasing -i//anaconda/include -arch x86_64 -dndebug -g -fwrapv -o3 -wall -wstrict-prototypes -i//anaconda/include/python2.7 -c tesseract_ocr.cpp -o build/temp.macosx-10.5-x86_64-2.7/tesseract_ocr.o tesseract_ocr.cpp:264:10: fatal error: 'leptonica/allheaders.h' file not found #include "leptonica/allheaders.h" ^ 1 error generated. error: command 'gcc' failed exit status 1 i don't know do.
you need install libleptonica-dev in system;
sudo apt install libleptonica-dev
Comments
Post a Comment