Я установил tesseract в Google colab с помощью команды
!pip3 install pytesseract
!pip3 install tesseract-ocr
!sudo apt install libtesseract-dev
Затем я выполнил команду
from pytesseract import image_to_string
import pytesseract
pytesseract.pytesseract.tesseract_cmd = r'/usr/local/bin/pytesseract'
pytesseract.image_to_string(img, lang='eng', config=r'--oem 3 --psm 7')
Затем я получил ошибку
---------------------------------------------------------------------------
TesseractError Traceback (most recent call last)
<ipython-input-42-3e07674434a3> in <module>()
3
----> 4 pytesseract.image_to_string(im_bw, lang='eng', config=r'--oem 3 --psm 7')
3 frames
/usr/local/lib/python3.6/dist-packages/pytesseract/pytesseract.py in run_tesseract(input_filename, output_filename_base, extension, lang, config, nice, timeout)
234 with timeout_manager(proc, timeout) as error_string:
235 if proc.returncode:
--> 236 raise TesseractError(proc.returncode, get_errors(error_string))
237
238
TesseractError: (2, 'Usage: pytesseract [-l lang] input_file')