我正在尝试使用 pytesseract OCR 读取支票中的文本。我已经安装了此任务所需的 Python 包,例如 pip install pytesseract。但是,当我尝试使用该包读取文件时,出现以下错误: pytesseract.image_to_string(im,)Traceback (most recent call last): File "<ipython-input-17-d7d9f430493b>", line 1, in <module> pytesseract.image_to_string(im,) File "C:\Users\BRIGHT\Anaconda3\lib\site-packages\pytesseract\pytesseract.py", line 294, in image_to_string return run_and_get_output(*args) File "C:\Users\BRIGHT\Anaconda3\lib\site-packages\pytesseract\pytesseract.py", line 202, in run_and_get_output run_tesseract(**kwargs) File "C:\Users\BRIGHT\Anaconda3\lib\site-packages\pytesseract\pytesseract.py", line 172, in run_tesseract raise TesseractNotFoundError()TesseractNotFoundError: tesseract is not installed or it's not in your path这个错误没有意义,因为我实际上导入了包而没有出现任何错误。但是当我尝试使用它时,我得到了错误。这是我的代码:from PIL import Imageimport pytesseractim=Image.open('BritishChequeAnnotated.jpg')text=pytesseract.image_to_string(im,)
添加回答
举报
0/150
提交
取消