Pytesseract 回溯错误 "file not found"

Pytesseract traceback error "file not found"

我正在尝试将 pytesseract 用于 OCR。

我已经安装了google tesseract 3.03
我已经安装了 pytesseract 0.1.6
我是运行宁Python3.5.1
我是运行宁Windows8
Tesseract 也在我的路径中(我可以从普通 CMD 中的任何地方调用它,它将 return 帮助功能)

这是我尝试执行的代码:

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))

但它 return 是这个错误:

  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

我知道 tesseract 和 pytesseract 都可以工作,因为如果我 运行 来自 CMD:

python pytesseract.py -l eng+nld test.png

确实有效,return按预期向我发送字符。
我究竟做错了什么?

提前致谢!
Mats de Waard

我终于让它工作了。似乎一切都设置正确,而且我正在正确调用一切,但我需要重新启动 Windows,因为 Python 找不到文件。

我忘记了 windows 调试总是从重启开始 :P