Я новичок в Python. Я пытаюсь создать программу распознавания текста Python и следую онлайн-руководству по ней. Вот рекомендуемый код, который я использую:
from PIL import Image
from pytesser import *
image_file = 'menu.tif'
im = Image.open(image_file)
text = image_to_string(im)
text = image_file_to_string(image_file)
text = image_file_to_string(image_file, graceful_errors=True)
print "=====output=======\n"
print text
Ссылка на руководство находится здесь. Однако я получаю эту ошибку при запуске этого кода.
from pytesser import *
ImportError: No module named 'pytesser'
Я выполнил инструкции по установке OCR здесь и библиотеки PyTesser здесь, код (точка) google (точка) com / archive / p / pytesser / downloads (извините, потому что ‹10 rep я не могу разместить более 2 ссылок).
Это (см. Gyazo ниже) - скриншот моих установочных файлов, где pytesser_v0.0.1 - моя папка pytesser, tesseract-master - найдена на GitHub (вероятно, не имеет отношения), а tessinstall - это папка, в которой Я установил tesseract и, наконец, pyimgr.py - это мой файл, который я пытаюсь запустить.
gyazo (точка) com / 333f8a3333e87895558f26875a8a8487
Я также ранее получал сообщение об ошибке при импорте изображения PIL. Мне не следует использовать PIL, есть ли другой способ импортировать изображение без PIL? может подушка?
Моя версия Python - 3.5.2, и я использую Windows 10.