Pytesseract не видит Tesseract

Пытаюсь распознать текст с картинки, но при запуске скрипта падает ошибка

raise TesseractNotFoundError()
pytesseract.pytesseract.TesseractNotFoundError: /home/usr/share/tesseract-ocr/ is not installed or it's not in your PATH. See README file for more information.

Код:

import cv2
import pytesseract

img = cv2.imread('1.png')
img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)

text = pytesseract.image_to_string(img)

print(text)

Дистрибутив Ubuntu 22.04

Код запускаю в PyCharm

Сам Tesseract установлен через терминал командой:

sudo apt install tesseract-ocr

В чем может быть проблема?


Ответы (0 шт):