I have been having some problems with Pytesser using this code to test it:
from PIL import Image
import pytesseract
img = Image.open('pic.png')
img.load()
text = pytesseract.image_to_string(img)
print(text)
Run on Python 3.4 in Windows
When run I get the error originating from the Pytesseract module:
Traceback (most recent call last):
File "C:/Users/Gamer/Documents/Python/Bot/test.py", line 6, in <module>
text = pytesseract.image_to_string(img)
File "C:\Python34\lib\site-packages\pytesseract\pytesseract.py", line 122, in image_to_string
config=config)
File "C:\Python34\lib\site-packages\pytesseract\pytesseract.py", line 46, in run_tesseract
proc = subprocess.Popen(command, stderr=subprocess.PIPE)
File "C:\Python34\lib\subprocess.py", line 859, in __init__
restore_signals, start_new_session)
File "C:\Python34\lib\subprocess.py", line 1114, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
I am new to installing modules and this may have originated from a bad install or setup of Tesseract-OCR or the module.
Any help will be greatly appreciated,
-Niall
tesseract
from Tesseract-OCR in your PATH? If not either add it to your PATH environment vairable or use this variable to give a custom path. – st0le Jun 5 '17 at 18:34