-1
import pytesseract as pt
from PIL import Image
img = Image.open("C:/Users/Abir Khan/Desktop/IIT B/Untitled.png")
text = pt.image_to_string(img)
print(text)
Eran Moshe
  • 3,062
  • 2
  • 22
  • 41
Abir Khan
  • 11
  • 2
  • 4

2 Answers2

1

OS: MacOS Catalina 10.15.7 pip version: 20.2.4 requirements.txt: Pillow==2.8.1

Upgrading Pillow via pip install --upgrade Pillow to version 8.0.1 worked for me perfectly.

I have tried several different approaches like installing zlib and lzlib through brew but nothing worked.

vsobotka
  • 153
  • 6
0

It likely only needs the zip decoder to save the jpeg. I think I needed to follow these steps in OS X to preview jpegs.

this might help.

https://stackoverflow.com/a/3544159/8074624

Gaurav Shimpi
  • 21
  • 1
  • 7