Because I stepped on the pit for two hours. Especially in the configuration of dependent TESSERACT-ORC identification library problems especially troublesome
Must use Brewhome must use the Brewhome must use the Brewhome
The important thing to say three times.
At first I checked the internet on the dependence of the relationship, I think it is not difficult to download the source code down to compile a variety of problems. I didn't solve it at last.
So it is recommended to use Brewhome to install it slightly more convenient.
These are the gadgets to install.
autoconf jpeg libpng libtoolautomake leptonica libtiff tesseract
Pay special attention to installing the Leptonica before installing tesseract
Using Brewhome is a convenient direct-use command
Brew Install Leptonic
You can do it.
Last install tesseract use command
Brew Install Tesseract
This will cause this error.
Error:you must ' brew link Leptonica ' before tesseract can be installed
Then use the command
Brew Link Tesseract
will also be an error ...
Rror:could not symlink bin/convertfilestopdftarget/usr/local/bin/Convertfilestopdfalready exists. Want to remove it :'/usr/local/bin/convertfilestopdf ' to force the link and overwrite allconflicting Files: --overwrite Leptonicato list all files, would be deleted: --overwrite--dry-run Leptonica
Here are some tips to choose the link mandatory override operation I'm using directly
Brew Link--overwrite Leptonica
And then re-execute
Brew Install Tesseract
You can install it.
These are actually configured only to install Python's Pytesseract module support. Python also needs the support of the PIL library when using this module, which I will not repeat here. Let's find out what else it is. The most troublesome is definitely pytesseract-orc this module, the other should be able to use PIP install to solve.
Questions about configuring Pytesseract on Mac