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