title: tesseract.exe is not installed or it's not in your path
body: <p>I am using Pytesseract to read a specific part of a PDF. Following is my code to configure tesseract into my code.</p>
  
  <pre><code>pytesseract.pytesseract.tesseract_cmd = os.path.join(cwd, "Tesseract-OCR\\tesseract.exe")
  </code></pre>
  
  <p><em>cwd</em> is the same directory where my SplitPDF.py file and the Tesseract-OCR (which contains tesseract.exe) folder are present.</p>
  
  <p>When I execute SplitPDF.py everything works fine and I have my desired output.
  But the problem occurs when I create SplitPDF.exe (using Pyinstaller) I am getting an error that says tesseract.exe is not installed or it's not in your path. </p>
  
  <p>Following is the complete error:</p>
  
  <blockquote>
    <p>Traceback (most recent call last):   File
    "site-packages\pytesseract\pytesseract.py", line 223, in run_tesseract
    File "subprocess.py", line 775, in <strong>init</strong>   File "subprocess.py",
    line 1178, in _execute_child FileNotFoundError: [WinError 2] The
    system cannot find the file specified</p>
    
    <p>During handling of the above exception, another exception occurred:</p>
    
    <p>Traceback (most recent call last): File "tkinter__init__.py", line
    1705, in <strong>call</strong> File "PDF_Splitter.py", line 241, in UploadAction1
    pdfsplitbylca(entryString) File "Split_by_LCA_1.py", line 155, in
    pdfsplitbylca text = pytesseract.image_to_string(im, lang = 'eng')
    File "site-packages\pytesseract\pytesseract.py", line 345, in
    image_to_string File "site-packages\pytesseract\pytesseract.py", line
    344, in  File "site-packages\pytesseract\pytesseract.py", line
    253, in run_and_get_output File
    "site-packages\pytesseract\pytesseract.py", line 225, in run_tesseract
    pytesseract.pytesseract.TesseractNotFoundError:
    C:\Users\VADIRA~1.KAT\AppData\Local\Temp_MEI370202\Tesseract-OCR\tesseract.exe
    is not installed or it's not in your path</p>
  </blockquote>
  
  <p>Am I not creating the .exe correctly or is there a better way to configure Tesseract?</p>