pip install pytesseract
pip install tesseract
python
import pytesseract
from PIL import Image
image = Image.open('image.jpg')
text = pytesseract.image_to_string(image, lang='eng')
print(text)
python
import pytesseract
pytesseract.pytesseract.tesseract_cmd = r'C:\Program Files\Tesseract-OCR\tesseract.exe'
lang = 'chi_sim'
text = pytesseract.image_to_string(image, lang=lang)
print(text)