pytesseract 中文识别错误解决
2023-09-11 14:20:50 时间
File "E:\odsoft\python\lib\subprocess.py", line 775, in __init__
restore_signals, start_new_session)
File "E:\odsoft\python\lib\subprocess.py", line 1179, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] 系统找不到指定的文件。
text = pytesseract.image_to_string(Image.open("bb.jpg"),lang='chi_sim')
print(text)
出现错误解决方法
pytesseract.pytesseract.tesseract_cmd = 'E:/Program Files/Tesseract-OCR/tesseract.exe'
或者修改pytesseract.py中32行处:
#!/usr/bin/env python
import re
import shlex
import string
import subprocess
import sys
from contextlib import contextmanager
from csv import QUOTE_NONE
from distutils.version import LooseVersion
from errno import ENOENT
from functools import wraps
from glob import iglob
from io import BytesIO
from os import environ
from os import extsep
from os import linesep
from os import remove
from os.path import normcase
from os.path import normpath
from os.path import realpath
from pkgutil import find_loader
from tempfile import NamedTemporaryFile
from threading import Timer
from time import sleep
try:
from PIL import Image
except ImportError:
import Image
tesseract_cmd = 'E:/Program Files/Tesseract-OCR/tesseract.exe'
相关文章
- [C++]VisualAssistX中文注释提示错误 解决办法
- XMLHttpRequest: 网络错误 0x2ee4, 由于出现错误 00002ee4 而导致此项操作无法完成
- MS SQL 2008 发布订阅配置错误总结
- 多数公司容易犯的5个大数据错误
- (org.jbehave.core.failures.BeforeOrAfterFailed: webdriver selenium错误解决。
- win10系统更新不了,总出现错误0xc8000442
- SAP Spartacus 项目开发时需要注意的一些常见错误
- 在用 Eclipse 搭建 SAP Commerce Cloud 调试环境时,错误和正确的 buildfile
- 无法打开物理文件 "D:understructuredata _DAT.MDF"。操作系统错误 5:"5(拒绝访问。)"
- paip.python错误解决 "0x64024e96" 指令引用的 "0x00000135" 内存。该内存不能为 "read"。
- http status 400,http 400,400 错误
- 【异常】使用Navicat导出Excel,但是id字段变成科学计数法(类型错误)
- SQL Server 附加数据库时报1813错误的解决方案