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.
ERROR: InterpreterNotFound: python3.11
py311: FAIL code 1Common 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.
- uses: actions/setup-python@v5
with:
python-version: |
3.11
3.12Skip missing interpreters intentionally
If a runner only has some versions, let tox skip the absent ones rather than fail.
[tox]
skip_missing_interpreters = trueHow to prevent it
- Install all interpreters your tox matrix targets in CI.
- Use
skip_missing_interpreterswhen a runner intentionally lacks some. - Keep the tox env list aligned with the CI Python versions.