pip install pytesseract
pip install pillow
from PIL import Image
import pytesseract
image = Image.open(“votre_image.jpg”)
texte_extrait = pytesseract.image_to_string(image)
print(texte_extrait)
Help me programme is not working
pip install pytesseract
pip install pillow
from PIL import Image
import pytesseract
image = Image.open(“votre_image.jpg”)
texte_extrait = pytesseract.image_to_string(image)
print(texte_extrait)
Help me programme is not working
Hello Abdjlil what is not working but it seems you want to grab texts from an image and print them?
first of all are you trying to install libraries/modules directly from the script file?.. is that how you have written your code?
your program should look something like this
#pip install pytesseract install these two libraries using the terminal first
#pip install pillow
from PIL import Image
import pytesseract
image = Image.open(“votre_image.jpg”)
texte_extrait = pytesseract.image_to_string(image)
print(texte_extrait)
if that’s not the case then ensure those image files you are trying to process are in the same directory as your script or if they are in a different directory then get their absolute paths but you will use a r""
format to access the images
hi, you’ve encountered the same issue too, where the text it reads is different from what’s in the picture. Have you solved it?