title: TesseractNotFoundError: tesseract is not installed or it's not in your path
body: <p>I am trying to use tesseract-OCR to print text from the image. But I am getting the above error. I have installed tesseract OCR using <a href="https://github.com/UB-Mannheim/tesseract/wiki" rel="nofollow noreferrer">https://github.com/UB-Mannheim/tesseract/wiki</a> and pytesseract in the anaconda prompt using pip install pytesseract but its not working. Please help if anyone has faced the similar issue.</p>
  <pre><code>Collecting pytesseract
    Downloading https://files.pythonhosted.org/packages/13/56/befaafbabb36c03e4fdbb3fea854e0aea294039308a93daf6876bf7a8d6b/pytesseract-0.2.4.tar.gz (169kB)
      100% |████████████████████████████████| 174kB 288kB/s
  Requirement already satisfied: Pillow in c:\users\500066016\appdata\local\continuum\anaconda3\lib\site-packages (from pytesseract) (5.1.0)
  Building wheels for collected packages: pytesseract
    Running setup.py bdist_wheel for pytesseract ... done
    Stored in directory: C:\Users\500066016\AppData\Local\pip\Cache\wheels\a8\0c\00\32e4957a46128bea34fda60b8b01a8755986415cbab3ed8e38
  Successfully built pytesseract
  </code></pre>
  <p>Below is the code:</p>
  <pre><code>import pytesseract
  import cv2
  import numpy as np
  
  def get_string(img_path):
      img = cv2.imread(img_path)
      img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
      kernel = np.ones((1,1), np.uint8)
      dilate = cv2.dilate(img, kernel, iterations=1)
      erosion = cv2.erode(img, kernel, iterations=1)
  
      cv2.imwrite('removed_noise.jpg', img)
      img = cv2.adaptiveThreshold(img, 255, cv2.ADAPTIVE_THRESH_GAUSSIAN_C, cv2.THRESH_BINARY, 11, 2)
      cv2.imwrite('thresh.jpg', img)
      res = pytesseract.image_to_string('thesh.jpg')
      return res
  print('Getting string from the image')
  print(get_string('quotes.jpg'))
  </code></pre>
  <p>Below is the error:</p>
  <pre><code>Traceback (most recent call last):
  
    File &quot;&lt;ipython-input-2-cf6e0fca14b4&gt;&quot;, line 1, in &lt;module&gt;
      runfile('C:/Users/500066016/.spyder-py3/project1.py', wdir='C:/Users/500066016/.spyder-py3')
  
    File &quot;C:\Users\500066016\AppData\Local\Continuum\anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py&quot;, line 705, in runfile
      execfile(filename, namespace)
  
    File &quot;C:\Users\500066016\AppData\Local\Continuum\anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py&quot;, line 102, in execfile
      exec(compile(f.read(), filename, 'exec'), namespace)
  
    File &quot;C:/Users/500066016/.spyder-py3/project1.py&quot;, line 23, in &lt;module&gt;
      print(get_string('quotes.jpg'))
  
    File &quot;C:/Users/500066016/.spyder-py3/project1.py&quot;, line 20, in get_string
      res = pytesseract.image_to_string('thesh.jpg')
  
    File &quot;C:\Users\500066016\AppData\Local\Continuum\anaconda3\lib\site-packages\pytesseract\pytesseract.py&quot;, line 294, in image_to_string
      return run_and_get_output(*args)
  
    File &quot;C:\Users\500066016\AppData\Local\Continuum\anaconda3\lib\site-packages\pytesseract\pytesseract.py&quot;, line 202, in run_and_get_output
      run_tesseract(**kwargs)
  
    File &quot;C:\Users\500066016\AppData\Local\Continuum\anaconda3\lib\site-packages\pytesseract\pytesseract.py&quot;, line 172, in run_tesseract
      raise TesseractNotFoundError()
  
  TesseractNotFoundError: tesseract is not installed or it's not in your path```
  </code></pre>