0
点赞
收藏
分享

微信扫一扫

python 手把手教你解决 TesseractNotFoundError: tesseract is not installed or it‘s not in your path

@[TOC]

1. 错误原因

下载安装的 tesseract 的环境变量和pytesseract源文件中的相关路径没有配置好

2. 解决方案

2.1 添加环境变量

打开设置,搜索环境变量,点击新建,将安装好的 tesseract -OCR 的路径复制粘贴过来
4.png
5.png

2.2 修改pytesseract.py文件中的tesseract_cmd路径

  1. 找到 tesseract-OCR 中 tesseract.exe 文件的存储位置,复制文件路径
    1.png

  2. 找到 pytesseract 的安装位置,如果是anaconda,那通常在Anaconda\Lib\site-packages路径下,找到pytesseract.py文件以后打开,将其中tesseract_cmd的路径替换为tesseract.exe的路径,修改后保存即可
    2.png3.png

3. 资源链接补充

tesseract - OCR下载地址:https://digi.bib.uni-mannheim.de/tesseract/

举报

相关推荐

0 条评论