You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Windows 10 x64运行pdf-diff工具时触发FileNotFoundError求助

Troubleshooting FileNotFoundError with pdf-diff on Windows 10 x64 (Python 3.6 32-bit)

I get it—dealing with FileNotFoundError: [WinError 2] in subprocess.py when trying to run pdf-diff is frustrating, especially since you’ve already reached out to the repo maintainers without a response yet. Let’s walk through the most likely causes and fixes for this issue on your setup.

Why This Happens

This error almost always means the subprocess module can’t locate an external executable that pdf-diff depends on. Under the hood, pdf-diff uses tools like pdftotext (part of the Poppler PDF toolkit) to parse PDFs. The problem is probably one of two things:

  • The required Poppler binaries aren’t installed on your system, or
  • Your 32-bit Python instance can’t find the binaries in your system PATH (a common mismatch on 64-bit Windows).

Fixes to Try

  • Install 32-bit Poppler for Windows
    Since you’re running 32-bit Python, you need the matching 32-bit version of Poppler to avoid architecture conflicts. Download it, extract the files to a folder like C:\Poppler\, then add the bin subfolder (e.g., C:\Poppler\bin) to your system’s PATH environment variable. Don’t forget to restart your Command Prompt or terminal to pick up the new PATH changes.

  • Verify pdftotext is accessible
    Open a fresh Command Prompt and run pdftotext --version. If this returns version details, you know the tool is correctly added to PATH. If not, double-check your PATH entry or restart your PC to ensure the changes take effect.

  • Hardcode the pdftotext path in pdf-diff
    If adding to PATH doesn’t work, you can modify the pdf-diff code to point directly to the executable. Look for the line in the code where subprocess calls pdftotext, and replace the executable name with the full Windows path (including the .exe extension), like this:

    subprocess.run([r"C:\Poppler\bin\pdftotext.exe", your_pdf_path, output_path])
    

    Adjust the path to match where you installed Poppler.

  • Upgrade to a newer Python version (if feasible)
    Python 3.6 is end-of-life and lacks support for newer Windows features. While you tried both 32 and 64-bit 3.6 versions, upgrading to a supported 64-bit Python release (like 3.8 or later, matching your 64-bit OS) could resolve compatibility issues with subprocess and external tools. Just remember to reinstall pdf-diff and its dependencies after upgrading.

If none of these steps work, take a closer look at the exact line in subprocess.py that’s failing—sometimes tools hardcode executable names without the .exe extension, which trips up Windows. You might need to add .exe to the executable name in the pdf-diff code.

内容的提问来源于stack exchange,提问作者Mohammad Taksokhan

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.21 03:27:42