我试图让tesseract ocr识别图像上的字符串。我在windows操作系统的pc上使用python。我已经为tesseract OCR安装了python包装器,即pytesseract with pip install。我收到以下错误消息:
runfile('C:/Users/rlc/Desktop/tesseract_test.py', wdir='C:/Users/rlc/Desktop')
Traceback (most recent call last):
File "<ipython-input- 1-5f5eff4c4064>", line 1, in <module>
runfile('C:/Users/rlc/Desktop/tesseract_test.py', wdir='C:/Users/rlc/Desktop')
File "C:\Users\rlc\Anaconda2\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 714, in runfile
execfile(filename, namespace)
File "C:\Users\rlc\Anaconda2\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 74, in execfile
exec(compile(scripttext, filename, 'exec'), glob, loc)
File "C:/Users/rlc/Desktop/tesseract_test.py", line 12, in <module>
pytesseract.image_to_string(Image.open('example_02.png'))
File "C:\Users\rlc\Anaconda2\lib\site-packages\pytesseract\pytesseract.py", line 161, in image_to_string
config=config)
File "C:\Users\rlc\Anaconda2\lib\site-packages\pytesseract\pytesseract.py", line 94, in run_tesseract
stderr=subprocess.PIPE)
File "C:\Users\rlc\Anaconda2\lib\subprocess.py", line 711, in __init__
errread, errwrite)
File "C:\Users\rlc\Anaconda2\lib\subprocess.py", line 959, in _execute_child
startupinfo)
WindowsError: [Error 2] Den angivne fil blev ikke fundet.
似乎找不到文件子流程.py. 在
有没有让tesseract ocr在windows os pc上运行的解决方案、好主意或教程?非常感谢你的帮助。在
开始扫描图像时,请这样使用:
注意:不要使用“C:\Tesseract OCR”的实际路径\tesseract.exe文件在你的电脑里
以下是tesseract最新版本的链接:
32位版本
访问:https://digi.bib.uni-mannheim.de/tesseract/tesseract-ocr-w32-setup-v5.0.0-alpha.20191030.exe
64位版本
访问:https://digi.bib.uni-mannheim.de/tesseract/tesseract-ocr-w64-setup-v5.0.0-alpha.20191030.exe
明白了吗子流程.py实际上包括在水蟒2和Python3中。错误的原因是tesseract所在的路径没有作为环境路径变量添加到Windows中。在
使pytesseract在windows上运行的步骤。在
安装pytesseract,例如
pip安装pytesseract
还有。。在
你好。在
相关问题 更多 >
编程相关推荐