Skip to content
Latchkey

tox "InterpreterNotFound" / "could not find executable" in CI

A tox environment targets a Python version (say py312) that isn’t installed on the runner. tox can’t create that environment, so it errors or silently skips it.

What this error means

tox reports InterpreterNotFound: python3.12 or could not find executable, or marks an env as skipped. With --skip-missing-interpreters false it’s a hard failure; otherwise the env is quietly skipped and tests for that version never run.

tox output
py312: InterpreterNotFound: python3.12
# or
ERROR: InvocationError ... could not find executable python3.12
py312: SKIP (missing interpreter)

Common causes

Targeted Python not installed

tox envlist includes py312 but the runner only has 3.11. tox needs each targeted interpreter present to build its env.

Missing interpreters silently skipped

By default tox may skip envs whose interpreter is absent, so a version you think you’re testing never actually runs - a false green.

How to fix it

Install every interpreter tox targets

Provide all the Python versions in envlist on the runner.

.github/workflows/ci.yml
- uses: actions/setup-python@v5
  with:
    python-version: |
      3.11
      3.12
- run: pip install tox && tox

Fail instead of silently skipping

Make missing interpreters a hard error so a version isn’t skipped unnoticed.

Terminal
tox --skip-missing-interpreters false

How to prevent it

  • Install all interpreters in envlist, or split them across a CI matrix.
  • Use --skip-missing-interpreters false so skips don’t pass silently.
  • Keep tox envlist in sync with the Python versions you support.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →