ubuntu内使用pytesseract报错:pytesseract.pytesseract.TesseractNotFoundError: tesseract is not installed or

问题截图:

这个问题折磨了我两天,终于在谷歌上找到了解决方案:

sudo apt update
sudo apt install tesseract-ocr
sudo apt install libtesseract-dev

PS:
如果是windows系统内:
首先下载,找到软件的运行路径,例如C:\Program Files (x86)\Tesseract-OCR\tesseract.exe,则要修改python脚本,加上变量:
pytesseract.pytesseract.tesseract_cmd = 'C:\Program Files (x86)\Tesseract-OCR\tesseract.exe'


版权声明:本文为w461546435原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。