FileNotFoundError: [WinError 2] The system cannot find the file specified (Whisper / ffmpeg)
Whisper and other audio tools shell out to the ffmpeg program, which pip cannot install. Install ffmpeg with your system package manager and reopen the terminal.
Updated
The error
FileNotFoundError: [WinError 2] The system cannot find the file specified
Raised from inside whisper.transcribe, pydub, or torchaudio while trying to read an audio file. On Linux/macOS the honest version names the culprit:
FileNotFoundError: [Errno 2] No such file or directory: 'ffmpeg'
What it means
ffmpeg is a standalone audio/video conversion program — not a Python package. Libraries like OpenAI's Whisper and pydub run it as a subprocess to decode your mp3/mp4/wav. Python asked the OS to launch ffmpeg, the OS searched the PATH, found nothing, and raised. The Windows wording is maddening because it never mentions ffmpeg — it sounds like your audio file is missing. It is the ffmpeg executable that is missing.
Why it happens
pip install openai-whisper installs the Python side only; the README's ffmpeg requirement is easy to miss. Two traps deepen the hole: pip install ffmpeg installs an unrelated package, and pip install ffmpeg-python installs only bindings that still require the real program. Neither puts an ffmpeg.exe on your machine.
How to fix it
1. Install the actual ffmpeg program.
# Windows (either)
winget install --id Gyan.FFmpeg
choco install ffmpeg
# macOS
brew install ffmpeg
# Ubuntu/Debian
sudo apt install ffmpeg2. Reopen the terminal, then verify it is on PATH.
ffmpeg -versionA version banner means done — re-run your transcription. "Not recognized" after a winget install usually means the old terminal predates the PATH change; open a new one (log out/in if needed).
3. No admin rights? Use conda, which installs ffmpeg inside the environment.
conda install -c conda-forge ffmpegWorks in any conda environment without touching the system — handy on locked-down machines.
4. Manual install needs a manual PATH entry. If you unzipped a build from gyan.dev, add its bin folder to PATH (Settings → System → About → Advanced system settings → Environment Variables), then reopen the terminal. Skipping the PATH step reproduces the error with ffmpeg sitting right there on disk.
5. If ffmpeg runs but a specific file still fails, test it directly.
ffmpeg -i clip.mp4 -ar 16000 out.wavffmpeg's own error output names real file problems — wrong path, unsupported codec, zero-byte file — far better than the Python wrapper does.
How to prevent it
Treat ffmpeg like a system prerequisite, documented next to Python version in the README of any audio/video project. In Docker, bake apt-get install -y ffmpeg into the image. And remember the rule this error teaches: pip installs Python packages, never external programs.
Related errors
- ModuleNotFoundError: No module named 'torch' — the Python-package half of missing-thing errors
- 'conda' is not recognized — the same PATH lesson for conda itself
- No module named 'cv2'