Skip to content
Latchkey

tox "ERROR: InterpreterNotFound" in CI

A tox environment names a Python version (e.g. py311) and tox could not find that interpreter on PATH. The runner only has some Python versions installed, and the one tox wants is missing.

What this error means

tox fails an environment with "ERROR: InterpreterNotFound: python3.11" or "py311: InterpreterNotFound" while other environments run.

python
ERROR: InterpreterNotFound: python3.11
py311: FAIL code 1

Common causes

The targeted interpreter is not installed

The tox env (py311) needs a Python the runner does not provide, so tox cannot create its virtualenv.

tox runs only one CI Python without skipping

Without skip-missing-interpreters, an env for an absent interpreter fails the run instead of being skipped.

How to fix it

Provision the interpreters tox needs

Install every Python version your tox envs target before running tox.

.github/workflows/ci.yml
- uses: actions/setup-python@v5
  with:
    python-version: |
      3.11
      3.12

Skip missing interpreters intentionally

If a runner only has some versions, let tox skip the absent ones rather than fail.

tox.ini
[tox]
skip_missing_interpreters = true

How to prevent it

  • Install all interpreters your tox matrix targets in CI.
  • Use skip_missing_interpreters when a runner intentionally lacks some.
  • Keep the tox env list aligned with the CI Python versions.

Related guides

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