Ich versuche, Pytasseract für OCR zu verwenden.Pytesseract Trace-Back-Fehler "Datei nicht gefunden"
Ich habe 3,03 google Tesserakts
installiert habe ich installiert pytesseract 0.1.6
Ich bin mit Python 3.5.1
Ich bin mit Windows 8
Tesseract ist auch in meinem Weg (ich es von überall anrufen in einem normalen CMD und es wird die Hilfe-Funktion)
und das ist der Code, den ich versuche zurückzukehren, auszuführen:
try:
import Image
except ImportError:
from PIL import Image
import pytesseract
im=Image.open('C:/Users/NeusAap/Google Drive/School/Jaar 1/Periode 1/Programming/Miniproject/GarageProject/scripts/test.png')
print(pytesseract.image_to_string(im))
Aber es gibt diesen Fehler zurück:
Traceback (most recent call last):
File "C:/Users/NeusAap/Google Drive/School/Jaar 1/Periode 1/Programming/Miniproject/GarageProject/scripts/main.py", line 8, in <module>
print(pytesseract.image_to_string(im))
File "C:\Users\NeusAap\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pytesseract\pytesseract.py", line 161, in image_to_string
config=config)
File "C:\Users\NeusAap\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pytesseract\pytesseract.py", line 94, in run_tesseract
stderr=subprocess.PIPE)
File "C:\Users\NeusAap\AppData\Local\Programs\Python\Python35-32\lib\subprocess.py", line 947, in __init__
restore_signals, start_new_session)
File "C:\Users\NeusAap\AppData\Local\Programs\Python\Python35-32\lib\subprocess.py", line 1224, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
Process finished with exit code 1
Ich weiß, dass beide tesseract und pytesseract Arbeit, denn wenn ich das von CMD ausführen:
python pytesseract.py -l eng+nld test.png
Es funktioniert, und gibt mir die Zeichen wie erwartet.
Was mache ich falsch?
Vielen Dank im Voraus!
Mats de Waard