阳光刺眼睁不开

导航

ubuntu内使用pytesseract报错:pytesseract.pytesseract.TesseractNotFoundError: tesseract is not installed or it's not in your PATH.

问题截图:

这个问题折磨了我两天,百度出来全是windows系统的解决方法,今天终于在谷歌上找到了解决方案:

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'

posted on 2021-03-16 11:00  阳光刺眼睁不开  阅读(213)  评论(0编辑  收藏  举报