请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

使用pytesseract错误

老师您好,
-----------------以下为代码---------------
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.

请老师您帮我看一下感谢

正在回答

1回答

 tesseract is not installed or it’s not in your PATH. See README file for more information.

tesseract 安装并且添加环境变量了吗额?软件 不是说api

0 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信