我在Mac OS上运行,并用brew安装了tesseract,以下是我的看法。因为PyteSeract只是从python访问tesseract的方式,所以必须指定tesseract已经在计算机上的位置。
适用于Mac OS
试着找到tesseract的位置。exe是-如果您使用
酿造
,在终端上使用:
>brew list tesseract
这应该列出您的TeserAct所在的位置。exe差不多就是
> /usr/local/Cellar/tesseract/3.05.02/bin/tesseract
Then following their instructions
:
pytesseract.pytesseract.tesseract_cmd = r'<full_path_to_your_tesseract_executable>'
脓肿。脓肿。tesseract_cmd=r'/usr/local/Cellar/tesseract/3.05.02/bin/tesseract'
你应该做这个把戏!