使用image_to_string时如何修复pytesseract导入错误

时间:2019-05-23 04:05:32

标签: python importerror python-tesseract

我试图导入pytesseract,并且可以将其导入,但是当我使用image_to_string时,它给了我一个导入错误

我尝试重新安装枕头和pytesseract

from PIL import ImageGrab, Image
from pytesseract import image_to_string
import time

while True:
    im = ImageGrab.grab(bbox=(708, 862, 736, 913))
    time.sleep(0.001)
    im.save("Screen.png")

    print(image_to_string('Screen.png'))

预期结果是它将读取“ Screen.png”中的文本

this is my error: tesseract is not installed or it's not in your path

0 个答案:

没有答案