title: Python 3.6: FileNotFoundError: [WinError 2] The system cannot find the file specified when running PDF-DIFF tool
body: <p>I have a Windows 10 x64 based PC. I am trying to get this PDF-DIFF Python tool here: <a href="https://github.com/JoshData/pdf-diff" rel="nofollow noreferrer">https://github.com/JoshData/pdf-diff</a>
   to run and it hits this error when it is running a line from Python Lib file called 'subprocess.py' file.  </p>
  
  <p>I posted this issue with full screenshots of the error and still waiting for response: 
  <a href="https://github.com/JoshData/pdf-diff/issues/30" rel="nofollow noreferrer">https://github.com/JoshData/pdf-diff/issues/30</a></p>
  
  <p>Just to note that before installation of this github tool I :
  1) installed Python 3.6 (tried both 32 bit and 64) and currently have 32 bit</p>
  
  <p>2) installed Microsoft Visual Studio 14.0 Build tools (C++ build tools)</p>
  
  <p>3) in command prompt ran command: <code>pip install lxml</code> so that I could have 
  the xml libraries downloaded and satisfy the tool's requirements</p>
  
  <p>4) additionally have checked other stackoverflow threads suggesting that 'file not found' error is due to 'COMSPEC' variable being set differently in regedit vs. Python's subprocess.py. </p>
  
  <p>In windows key registry, 'ComSpec' key set to: <code>%SystemRoot%\system32\cmd.exe;</code></p>
  
  <p>In python subprocess call is being made as such (last line is 997):</p>
  
  <pre><code>     if shell:
              startupinfo.dwFlags |= _winapi.STARTF_USESHOWWINDOW
              startupinfo.wShowWindow = _winapi.SW_HIDE
              comspec = os.environ.get("COMSPEC", "cmd.exe")
              args = '{} /c "{}"'.format (comspec, args)
  
          #Start the process
          try:
              hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
                                       # no special security
                                       None, None,
                                       int(not close_fds),
                                       creationflags,
                                       env,
                                       os.fspath(cwd) if cwd is not None else 
    None,
                                       startupinfo)
  </code></pre>
  
  <p>I'm out of ideas, and feel the program requirements are satisfied. 
  So, when I run the command in the prompt to get my two PDF files compared and output comparison spit out: </p>
  
  <pre><code>C:\Python36\Scripts\pdf_diff&gt;pdf-diff 683000.pdf 17368000.pdf &gt; comparison_output.png
  </code></pre>
  
  <p>*I immediately get error shown below: </p>
  
  <pre><code>  Traceback (most recent call last):
  </code></pre>
  
  <blockquote>
    <p>File "C:\Python36\Scripts\pdf_diff\pdf-diff-script.py", line 11, in 
        load_entry_point('pdf-diff==0.9.0', 'console_scripts', 'pdf-diff')()
      File "C:\Python36\lib\site-packages\pdf_diff-0.9.0-py3.6.egg\pdf_diff\command_line.py", line 496, in main
        changes = compute_changes(args.files[0], args.files[1], top_margin=float(args.top_margin), bottom_margin=float(args.bottom_margin))
      File "C:\Python36\lib\site-packages\pdf_diff-0.9.0-py3.6.egg\pdf_diff\command_line.py", line 14, in compute_changes
        docs = [serialize_pdf(0, pdf_fn_1, top_margin, bottom_margin), serialize_pdf(1, pdf_fn_2, top_margin, bottom_margin)]
      File "C:\Python36\lib\site-packages\pdf_diff-0.9.0-py3.6.egg\pdf_diff\command_line.py", line 29, in serialize_pdf
        for run in box_generator:
      File "C:\Python36\lib\site-packages\pdf_diff-0.9.0-py3.6.egg\pdf_diff\command_line.py", line 102, in mark_eol_hyphens
        for next_box in boxes:
      File "C:\Python36\lib\site-packages\pdf_diff-0.9.0-py3.6.egg\pdf_diff\command_line.py", line 64, in pdf_to_bboxes
        xml = subprocess.check_output(["pdftotext", "-bbox", fn, "/dev/stdout"])
      File "C:\Python36\lib\subprocess.py", line 336, in check_output
        **kwargs).stdout
      File "C:\Python36\lib\subprocess.py", line 403, in run
        with Popen(*popenargs, **kwargs) as process:
      File "C:\Python36\lib\subprocess.py", line 709, in <strong>init</strong>
        restore_signals, start_new_session)
      File "C:\Python36\lib\subprocess.py", line 997, in _execute_child
        startupinfo)
       FileNotFoundError: [WinError 2] The system cannot find the file specified</p>
  </blockquote>