Skip to content

Commit 8a858ae

Browse files
committed
Merge pull request madmaze#6 from svisser/master
Fixed ImportError when using Pillow
2 parents 41c3e30 + 0069773 commit 8a858ae

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pytesseract/pytesseract.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@
4141
# CHANGE THIS IF TESSERACT IS NOT IN YOUR PATH, OR IS NAMED DIFFERENTLY
4242
tesseract_cmd = 'tesseract'
4343

44-
import Image
44+
try:
45+
import Image
46+
except ImportError:
47+
from PIL import Image
4548
import StringIO
4649
import subprocess
4750
import sys

0 commit comments

Comments
 (0)