Installing Python, OpenCv, PyTesseract and Tesseract-OCR on a Windows 10 64 Bit PC

Python as a programming language is preferred by most companies when it comes to Data Analytics/Machine Learning application development or related projects.

To install python on a 64 Bit Windows 10 PC, just follow the following steps:

  1. Go to python website https://www.python.org/ 
  2. Go to the downloads section
  3. Go to the "Looking for a specific release?" section and look for the 3.8 release version because this version is compatible with a lot of libraries.
  4. Once  the python installer file is downloaded , run it and an installation wizard window will appear. Just keep on clicking "Next" until you finish the installation.
  5. To check if python was installed successfully, go to command prompt and type "python --version".
  6. After typing the command just press the enter key and if python is installed correctly, the version should be displayed.

 Assuming you have been able to install python, the next task is to install OpenCV. By the way, OpenCV is a library of Python bindings designed to solve computer vision problems. More info can be found here.

To install OpenCV, just follow the following steps:

  1. Go to this link and download the installer file for Windows 10 64-bit.
  2. Once the download is completed, just run the file and an installer wizard window appears.
  3. Just keep on clicking the "Next" button until the installation is completed.
  4. To check if opencv was installed correctly,  open notepad and enter the following code:
  5.  Save the file as a python program(the extension must be ".py")
  6. Execute the python file at cmd terminal by typing  "python cv2_ver.py" where cv_ver,py is the python program created earlier.
  7. If opencv was installed correctly, it should return the current version of opencv.

If you have made it to this point, then you are now ready to install Tesseract-OCR and Pytesseract. Tesseract-OCR is an open source text recognition engine. You may find more information here. While pytesseract  or Python-tesseract is an optical character recognition (OCR) tool for python. That is, it will recognize and “read” the text embedded in images. It is a wrapper for Tesseract-OCR. More info here.

To install Tesseract-OCR and Pytesseract, do the following steps:

  1. Download the installation file here.
  2. As usual, an installation wizard will guide you how with the installation process. Once you finished the installation, open the command prompt or cmd prompt.
  3. Enter the following "pip install pytesseract"
  4. To test if it was installed correctly, open notepad to create a python file and enter the following commands:
  5. Save the file as a python program(the extension must be ".py")
  6. Execute the python file at cmd terminal by typing  "python ts.py" where ts.py is the python program created earlier.
  7.  If successfully installed, it will display the information about the pytesseract module.
And if you have made to this point, you are now ready to create programs that can detect objects, detect faces, read texts from images and who knows you will be the next Einstein.