老师您好,
-----------------以下为代码---------------
import pytesseract
from PIL import Image
image = Image.open(“E:/imooc.png”)
print(image)
a = pytesseract.image_to_string(image)
print(a)
----------------以下运行时的错误--------------------
Traceback (most recent call last):
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pytesseract\pytesseract.py”, line 252, in run_tesseract
proc = subprocess.Popen(cmd_args, **subprocess_args())
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\subprocess.py”, line 800, in init
restore_signals, start_new_session)
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\subprocess.py”, line 1207, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] 系统找不到指定的文件。
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “H:/test/ZXwang/read_image.py”, line 6, in
a = pytesseract.image_to_string(image)
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pytesseract\pytesseract.py”, line 417, in image_to_string
}output_type
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pytesseract\pytesseract.py”, line 416, in
Output.STRING: lambda: run_and_get_output(*args),
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pytesseract\pytesseract.py”, line 284, in run_and_get_output
run_tesseract(**kwargs)
File “C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\pytesseract\pytesseract.py”, line 256, in run_tesseract
raise TesseractNotFoundError()
pytesseract.pytesseract.TesseractNotFoundError: tesseract is not installed or it’s not in your PATH. See README file for more information.
请老师您帮我看一下感谢