当前位置:网站首页>图像识别问题 — pytesseract.TesseractNotFoundError: tesseract is not installed or it‘s not in your path
图像识别问题 — pytesseract.TesseractNotFoundError: tesseract is not installed or it‘s not in your path
2022-07-06 09:13:00 【zkkkkkkkkkkkkk】
目录
前言:
在做图像识别,需要对截取的图片识别其中的文字时,遇到如标题的报错。看错误这应该是tesseract 没有下载或者是没在你设置的路径中。那么我们开始解决。
一、下载所需文件
下载地址:Index of /tesseract 如下图找到其中一个下载即可

二、安装
2.1、 安装tesseract-OCR文件
打开刚刚下载的文件,记住此安装目录。

2.2、配置安装选项。
看个人选择语言类别。

三、设置文件读取路径
进入python打开pytesseract.py文件,找到如下代码行
tesseract_cmd = 'tesseract'将上面的一行改为下面的一行(就是刚刚2.1小节安装的路径):
tesseract_cmd = r'C:\Program Files\Tesseract-OCR\tesseract.exe'四、重新运行程序
以上全部完成后就可以重新运行Python程序,试试可不可以跑出结果。看网上说要配置环境变量等等,但是我没有配置也照样能跑。
边栏推荐
- There are three iPhone se 2022 models in the Eurasian Economic Commission database
- 虚拟机Ping通主机,主机Ping不通虚拟机
- MySQL23-存儲引擎
- Leetcode 461 Hamming distance
- Global and Chinese market of wafer processing robots 2022-2028: Research Report on technology, participants, trends, market size and share
- CSDN question and answer module Title Recommendation task (I) -- Construction of basic framework
- Global and Chinese markets of static transfer switches (STS) 2022-2028: Research Report on technology, participants, trends, market size and share
- Global and Chinese market for intravenous catheter sets and accessories 2022-2028: Research Report on technology, participants, trends, market size and share
- Development of C language standard
- 【博主推荐】C#MVC列表实现增删改查导入导出曲线功能(附源码)
猜你喜欢

解决:log4j:WARN Please initialize the log4j system properly.

CSDN博文摘要(一) —— 一个简单的初版实现

1. Mx6u learning notes (VII): bare metal development (4) -- master frequency and clock configuration

MySQL18-MySQL8其它新特性

Redis的基础使用

Mysql27 - Optimisation des index et des requêtes

windows下同时安装mysql5.5和mysql8.0

MySQL28-数据库的设计规范

CSDN问答模块标题推荐任务(一) —— 基本框架的搭建

35 is not a stumbling block in the career of programmers
随机推荐
MySQL22-逻辑架构
[BMZCTF-pwn] 11-pwn111111
MySQL20-MySQL的数据目录
解决扫描不到xml、yml、properties文件配置
CSDN question and answer tag skill tree (I) -- Construction of basic framework
Solution: log4j:warn please initialize the log4j system properly
windows下同时安装mysql5.5和mysql8.0
Invalid global search in idea/pychar, etc. (win10)
IDEA 导入导出 settings 设置文件
CSDN问答模块标题推荐任务(二) —— 效果优化
Development of C language standard
Mysql22 logical architecture
[paper reading notes] - cryptographic analysis of short RSA secret exponents
Discriminant model: a discriminant model creation framework log linear model
【博主推荐】asp.net WebService 后台数据API JSON(附源码)
A trip to Macao - > see the world from a non line city to Macao
Postman uses scripts to modify the values of environment variables
【博主推荐】C# Winform定时发送邮箱(附源码)
FRP intranet penetration
Postman Interface Association