当前位置:网站首页>Image recognition - pyteseract TesseractNotFoundError: tesseract is not installed or it‘s not in your path

Image recognition - pyteseract TesseractNotFoundError: tesseract is not installed or it‘s not in your path

2022-07-06 11:06:00 zkkkkkkkkkkkkk

Catalog

Preface :

One 、 Download the required files

Two 、 install

        2.1、  install tesseract-OCR file

        2.2、 Configure installation options .

3、 ... and 、 Set the file read path

Four 、 Rerun program


Preface :

         Doing image recognition , When you need to recognize the text in the intercepted picture , If you encounter an error like the title . Look wrong, this should be tesseract Not downloaded or not in the path you set . Then let's start to solve .

One 、 Download the required files

        Download address :Index of /tesseract  Just find one of them as shown in the figure below

Two 、 install

        2.1、  install tesseract-OCR file

                 Open the file you just downloaded , Remember this installation directory .

        

        

        2.2、 Configure installation options .

                 Look at the language category chosen by individuals .

        

        

3、 ... and 、 Set the file read path

        Get into python open pytesseract.py file , Find the following code line

tesseract_cmd = 'tesseract'

        Change the top line to the bottom line ( Just now 2.1 Section installation path ):

tesseract_cmd = r'C:\Program Files\Tesseract-OCR\tesseract.exe'

Four 、 Rerun program

        After all the above is completed, you can run again Python Program , Try whether you can get results . On the Internet, it is said to configure environment variables, etc , But I can still run without configuration .

原网站

版权声明
本文为[zkkkkkkkkkkkkk]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/187/202207060912332290.html

随机推荐