How can I Install Tesseract and Pytesseract

Learn to install Tesseract and Pytesseract on your local machine.

Install the Tesseract OCR engine

To install the Tesseract OCR engine for different operating systems, you can choose the relevant option from the choices given below: :

  • Ubuntu – For Ubuntu users, you can use the following command:
    sudo apt-get install tesseract-ocr
    
  • Windows – For Windows users, you can visit here and select 32-bit/64-bit as per your system.
  • Mac – For macOS users, you can use Homebrew to install Tesseract. The command is shown below:
    $ brew install tesseract
    

After installing, you can validate the installation by running the following command in your command prompt:

tesseract -v

It will print the version of the Tesseract OCR engine installed on your system.

Install pytesseract wrapper

Once you have installed your Tesseract OCR engine, you can run the following pip statement to install pytesseract:

pip install pytesseract

You are all set to can go ahead and perform some OCR operations on your local machine.

Get hands-on with 1400+ tech skills courses.