“startupinfo)windowserror 2系统找不到指定的文件”with tess

2024-06-01 23:26:19 发布

您现在位置:Python中文网/ 问答频道 /正文

我已经花了几个小时用windowserror error2来解决这个问题,但即使在寻找具体的解决方案之后,它仍然存在

我的计划是:

"from PIL import Image

import pytesseract

img = Image.open('D:/Divers/Projet plaques/m.png')

img.show()

img.load()

i = pytesseract.image_to_string(img)"

错误信息如下:

"Traceback (most recent call last):

File "D:\Divers\Projet plaques\Recognition.py", line 18, in i = pytesseract.image_to_string(img)

File "D:\Divers\Portable Python 2.7.6.1\App\lib\site-packages\pytesseract\pytesseract.py", line 161, in image_to_string config=config)

File "D:\Divers\Portable Python 2.7.6.1\App\lib\site-packages\pytesseract\pytesseract.py", line 94, in run_tesseract stderr=subprocess.PIPE)

File "D:\Divers\Portable Python 2.7.6.1\App\lib\subprocess.py", line 709, in init errread, errwrite)

File "D:\Divers\Portable Python 2.7.6.1\App\lib\subprocess.py", line 957, in _execute_child startupinfo)

WindowsError: [Error 2] Le fichier spécifié est introuvable"

我不知道该如何解决这个问题,因为这个问题似乎深藏其中。 我有Windows10,Python2.7,PIL和tesseract。在


Tags: toinpyimageappimgstringpil