HOW TO FIX - PIP IS NOT RECOGNIZED AS INTERNAL OR EXTERNAL COMMAND

set path:

"C:\Users\sital\AppData\Local\Programs\Python\Python38\Scripts"

to run PIP



HOW TO FIX - PIP IS NOT RECOGNIZED AS INTERNAL OR EXTERNAL COMMAND ERROR IN PYTHON || PIP ERROR


Download and Install pip:

pip can be downloaded and installed using command-line by going through the following steps:

  • Download the get-pip.py file and store it in the same directory as python is installed.
    Downloading and storing get-pip file
  • Change the current path of the directory in the command line to the path of the directory where the above file exists.
    Changing directory path
  • Run the command given below:
    python get-pip.py

    and wait through the installation process.
    Executing the command

  • Voila! pip is now installed on your system.

Verification of the Installation process:

One can easily verify if the pip has been installed correctly by performing a version check on the same. Just go to the command line and execute the following command:

pip -V

Verification of pip


To use Python-tesseract - requires python 2.5+ or python 3.x - first you have to install PIL and pytesseract packages through pip:

pip install Pillow
pip install pytesseract

Then you have to download and install the tesseract OCR:

https://sourceforge.net/projects/tesseract-ocr-alt/?source=typ_redirect

As far as I know it automatically adds it to your PATH variable.

Then use it like this way:

import pytesseract
from PIL import Image

img = Image.open('Capture.PNG')
pytesseract.pytesseract.tesseract_cmd = 'C:\\Program Files (x86)\\Tesseract-OCR\\tesseract.exe'
print( pytesseract.image_to_string(img) )

I hope it helps :)


Comments

Popular posts from this blog

OpenCV Video Capturing Error : CvCapture_MSMF::initStream Failed to set mediaType

Face Attendance

Official genuine JetBrains code pycharm Key