Skip to content Skip to sidebar Skip to footer

Convert Image To Txt With Python

I have this .py file that should convert images to strings. img2str.py: from PIL import Image from pytesseract import image_to_string image = Image.open('image.png', mode='r') pri

Solution 1:

You are probably missing tesseract-ocr from your machine. Check the installation instructions here: https://github.com/tesseract-ocr/tesseract/wiki

Or on linux, you can just install using apt:

sudo apt install tesseract-ocr
sudo apt install libtesseract-dev

If these commands don't fix the problem, you'll have to refer to the wiki linked above.

Post a Comment for "Convert Image To Txt With Python"