tesseract已经安装,环境变量也配置了,pytesseract.py文件也修改了
来源:2-14 使用pytesseract识别图片中得问题

慕勒6533749
2021-07-03
PS E:\selenium> & D:/python/python.exe e:/selenium/imooc_selenium/read_img.py
Traceback (most recent call last):
File “D:\python\lib\site-packages\pytesseract\pytesseract.py”, line 252, in run_tesseract
proc = subprocess.Popen(cmd_args, **subprocess_args())
File “D:\python\lib\subprocess.py”, line 756, in init
restore_signals, start_new_session)
File “D:\python\lib\subprocess.py”, line 1155, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] 系统找不到指定的文件。
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “e:/selenium/imooc_selenium/read_img.py”, line 6, in
txt = pytesseract.image_to_string(image)
File “D:\python\lib\site-packages\pytesseract\pytesseract.py”, line 417, in image_to_string
}output_type
File “D:\python\lib\site-packages\pytesseract\pytesseract.py”, line 416, in
Output.STRING: lambda: run_and_get_output(*args),
File “D:\python\lib\site-packages\pytesseract\pytesseract.py”, line 284, in run_and_get_output
run_tesseract(**kwargs)
File “D:\python\lib\site-packages\pytesseract\pytesseract.py”, line 256, in run_tesseract
raise TesseractNotFoundError()
pytesseract.pytesseract.TesseractNotFoundError: C:\Program Files(x86)\Tesseract-OCR\tesseract.exe is
for more information.
2回答
-
精慕门1029620
2022-02-15
咋解决的
00 -
慕勒6533749
提问者
2021-07-03
问题已经解决
012021-07-04
相似问题