close

[Solved] pytesseract.pytesseract.TesseractNotFoundError: tesseract is not installed or it’s not in your path

Hello Guys, How are you all? Hope You all Are Fine. Today I am just trying to get all text on the image with pytesseract but I am facing following error pytesseract.pytesseract.TesseractNotFoundError: tesseract is not installed or it’s not in your path in python. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How pytesseract.pytesseract.TesseractNotFoundError: tesseract is not installed or it’s not in your path Error Occurs ?

I am just trying to get all text on the image with pytesseract but I am facing following error.

pytesseract.pytesseract.TesseractNotFoundError: tesseract is not installed or it's not in your path

How To Solve pytesseract.pytesseract.TesseractNotFoundError: tesseract is not installed or it’s not in your path Error ?

  1. How To Solve pytesseract.pytesseract.TesseractNotFoundError: tesseract is not installed or it’s not in your path Error ?

    To Solve pytesseract.pytesseract.TesseractNotFoundError: tesseract is not installed or it’s not in your path Error First of all install tesseract with exe file at Here. 64-bit OR 32-bit. Then Install And note the installation path. For Example my path is C:\Users\ssc\AppData\Local\Tesseract-OCR Now install pytesseract with this command line: pip install pytesseract Now install tesseract with this command: pip install tesseract Now just before you are using tesseract Set the tesseract path in the script before calling. Here is Example.

  2. pytesseract.pytesseract.TesseractNotFoundError: tesseract is not installed or it’s not in your path

    To Solve pytesseract.pytesseract.TesseractNotFoundError: tesseract is not installed or it’s not in your path Error First of all install tesseract with exe file at Here. 64-bit OR 32-bit. Then Install And note the installation path. For Example my path is C:\Users\ssc\AppData\Local\Tesseract-OCR Now install pytesseract with this command line: pip install pytesseract Now install tesseract with this command: pip install tesseract Now just before you are using tesseract Set the tesseract path in the script before calling. Here is Example.

Solution 1: Set the tesseract path

  1. First of all install tesseract with exe file at Here. 64-bit OR 32-bit.
  2. Then Install And note the installation path. For Example my path is C:\Users\ssc\AppData\Local\Tesseract-OCR
  3. Now install pytesseract with this command line: pip install pytesseract
  4. Then install tesseract with this command: pip install tesseract
  5. Now just before you are using tesseract Set the tesseract path in the script before calling.
  6. Here is Example.
from PIL import Image
import pytesseract

pytesseract.pytesseract.tesseract_cmd =  r'C:\Users\ssc\AppData\Local\Tesseract-OCR\tesseract.exe'

im = Image.open("my_img_path.jpg")

text = pytesseract.image_to_string(im, lang = 'eng')

print(text)

Now your error must be solved.

Solution 2: For Linux Users

If You are Linux users then Just run this command.

sudo apt-get update
sudo apt-get install libleptonica-dev 
sudo apt-get install tesseract-ocr tesseract-ocr-dev
sudo apt-get install libtesseract-dev

Solution 3: for macOS users

If You are macOS users then Just run this command.

brew install tesseract

Summary

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?

Also, Read

Leave a Comment