Error in opening image file in PIL

前端 未结 6 617
闹比i
闹比i 2021-01-02 21:25

I am trying to execute the following code

from pytesser import *
import Image

i=\"C:/Documents and Settings/Administrator/Desktop/attachments/R1PNDTCB.jpg\"         


        
6条回答
  •  情话喂你
    2021-01-02 22:07

    If you are using pytesseract, you have to make sure that you have installed Tesseract-OCR in your system. After that you have to insert the path of the tesseract in your code, as below

    from PIL import Image
    import pytesseract
    
    pytesseract.pytesseract.tesseract_cmd = 'C:/Program Files (x86)/Tesseract 
    OCR/tesseract'
    

    You can download the Tesseract-OCR form https://github.com/UB-Mannheim/tesseract/wiki

提交回复
热议问题