Skip to content

skip_missing_interpreters ignored with uv=0.8.0 #222

@ziima

Description

@ziima

Issue

With the release of uv=0.8.0 tox-uv returns errors in combination of skip_missing_interpreters = true and uv_python_preference = only-system. The same tox configuration works with plain tox and a tox with tox-uv and uv=0.7.2 installed.

Environment

Provide at least:

  • OS: Debian
Output of pip list of the host Python, where tox is installed
Package       Version
------------- -------
cachetools    6.1.0
chardet       5.2.0
colorama      0.4.6
distlib       0.4.0
filelock      3.18.0
packaging     25.0
pip           25.1.1
platformdirs  4.3.8
pluggy        1.6.0
pyproject-api 1.9.1
tox           4.28.0
tox-uv        1.26.1
uv            0.8.0
virtualenv    20.32.0

Output of running tox

Output of tox -rvv
py39: 107 W remove tox env folder /tmp/pokus/.tox/py39 [tox/tox_env/api.py:357]
py39: 109 W venv> /home/vzima/.local/pipx/venvs/tox/bin/uv venv -p cpython3.9 --allow-existing -v --python-preference only-system /tmp/pokus/.tox/py39 [tox/tox_env/api.py:459]
DEBUG uv 0.8.0
DEBUG Using Python request `[email protected]` from explicit request
DEBUG Searching for CPython 3.9 in search path
DEBUG Found `cpython-3.13.5-linux-x86_64-gnu` at `/usr/bin/python3` (first executable in the search path)
DEBUG Skipping interpreter at `/usr/bin/python3` from first executable in the search path: does not satisfy request `3.9`
error: No interpreter found for CPython 3.9 in search path

hint: A managed Python download is available for CPython 3.9, but the Python preference is set to 'only system'
py39: 126 C exit 2 (0.02 seconds) /tmp/pokus> /home/vzima/.local/pipx/venvs/tox/bin/uv venv -p cpython3.9 --allow-existing -v --python-preference only-system /tmp/pokus/.tox/py39 pid=2435415 [tox/execute/api.py:294]
py39: FAIL ✖ in 0.02 seconds
py310: 127 W remove tox env folder /tmp/pokus/.tox/py310 [tox/tox_env/api.py:357]
py310: 128 W venv> /home/vzima/.local/pipx/venvs/tox/bin/uv venv -p cpython3.10 --allow-existing -v --python-preference only-system /tmp/pokus/.tox/py310 [tox/tox_env/api.py:459]
DEBUG uv 0.8.0
DEBUG Using Python request `[email protected]` from explicit request
DEBUG Searching for CPython 3.10 in search path
DEBUG Found `cpython-3.13.5-linux-x86_64-gnu` at `/usr/bin/python3` (first executable in the search path)
DEBUG Skipping interpreter at `/usr/bin/python3` from first executable in the search path: does not satisfy request `3.10`
error: No interpreter found for CPython 3.10 in search path

hint: A managed Python download is available for CPython 3.10, but the Python preference is set to 'only system'
py310: 152 C exit 2 (0.02 seconds) /tmp/pokus> /home/vzima/.local/pipx/venvs/tox/bin/uv venv -p cpython3.10 --allow-existing -v --python-preference only-system /tmp/pokus/.tox/py310 pid=2435426 [tox/execute/api.py:294]
py310: FAIL ✖ in 0.03 seconds
py311: 153 W remove tox env folder /tmp/pokus/.tox/py311 [tox/tox_env/api.py:357]
py311: 155 W venv> /home/vzima/.local/pipx/venvs/tox/bin/uv venv -p cpython3.11 --allow-existing -v --python-preference only-system /tmp/pokus/.tox/py311 [tox/tox_env/api.py:459]
DEBUG uv 0.8.0
DEBUG Using Python request `[email protected]` from explicit request
DEBUG Searching for CPython 3.11 in search path
DEBUG Found `cpython-3.13.5-linux-x86_64-gnu` at `/usr/bin/python3` (first executable in the search path)
DEBUG Skipping interpreter at `/usr/bin/python3` from first executable in the search path: does not satisfy request `3.11`
error: No interpreter found for CPython 3.11 in search path

hint: A managed Python download is available for CPython 3.11, but the Python preference is set to 'only system'
py311: 185 C exit 2 (0.03 seconds) /tmp/pokus> /home/vzima/.local/pipx/venvs/tox/bin/uv venv -p cpython3.11 --allow-existing -v --python-preference only-system /tmp/pokus/.tox/py311 pid=2435438 [tox/execute/api.py:294]
py312: 185 W remove tox env folder /tmp/pokus/.tox/py312 [tox/tox_env/api.py:357]
py311: FAIL ✖ in 0.03 seconds
py312: 189 W venv> /home/vzima/.local/pipx/venvs/tox/bin/uv venv -p cpython3.12 --allow-existing -v --python-preference only-system /tmp/pokus/.tox/py312 [tox/tox_env/api.py:459]
DEBUG uv 0.8.0
DEBUG Using Python request `[email protected]` from explicit request
DEBUG Searching for CPython 3.12 in search path
DEBUG Found `cpython-3.12.10-linux-x86_64-gnu` at `/usr/bin/python3.12` (first executable in the search path)
Using CPython 3.12.10 interpreter at: /usr/bin/python3.12
Creating virtual environment at: .tox/py312
DEBUG Using base executable for virtual environment: /usr/bin/python3.12
DEBUG Allowing existing directory due to `--allow-existing`
py312: 206 I exit 0 (0.02 seconds) /tmp/pokus> /home/vzima/.local/pipx/venvs/tox/bin/uv venv -p cpython3.12 --allow-existing -v --python-preference only-system /tmp/pokus/.tox/py312 pid=2435450 [tox/execute/api.py:294]
py312: 208 W commands[0]> python -c 'print("Test")' [tox/tox_env/api.py:459]
Test
py312: 231 I exit 0 (0.02 seconds) /tmp/pokus> python -c 'print("Test")' pid=2435459 [tox/execute/api.py:294]
py312: OK ✔ in 0.05 seconds
py313: 231 W remove tox env folder /tmp/pokus/.tox/py313 [tox/tox_env/api.py:357]
py313: 234 W venv> /home/vzima/.local/pipx/venvs/tox/bin/uv venv -p /home/vzima/.local/pipx/venvs/tox/bin/python --allow-existing -v --python-preference only-system /tmp/pokus/.tox/py313 [tox/tox_env/api.py:459]
DEBUG uv 0.8.0
DEBUG Using Python request `/home/vzima/.local/pipx/venvs/tox/bin/python` from explicit request
DEBUG Checking for Python interpreter at path `/home/vzima/.local/pipx/venvs/tox/bin/python`
Using CPython 3.13.5 interpreter at: /home/vzima/.local/pipx/venvs/tox/bin/python
Creating virtual environment at: .tox/py313
DEBUG Using base executable for virtual environment: /usr/bin/python3.13
DEBUG Allowing existing directory due to `--allow-existing`
py313: 250 I exit 0 (0.02 seconds) /tmp/pokus> /home/vzima/.local/pipx/venvs/tox/bin/uv venv -p /home/vzima/.local/pipx/venvs/tox/bin/python --allow-existing -v --python-preference only-system /tmp/pokus/.tox/py313 pid=2435465 [tox/execute/api.py:294]
py313: 252 W commands[0]> python -c 'print("Test")' [tox/tox_env/api.py:459]
Test
py313: 275 I exit 0 (0.02 seconds) /tmp/pokus> python -c 'print("Test")' pid=2435473 [tox/execute/api.py:294]
  py39: FAIL code 2 (0.02 seconds)
  py310: FAIL code 2 (0.03 seconds)
  py311: FAIL code 2 (0.03 seconds)
  py312: OK (0.05=setup[0.02]+cmd[0.02] seconds)
  py313: OK (0.04=setup[0.02]+cmd[0.02] seconds)
  evaluation failed :( (0.20 seconds)

Minimal example

Minimal tox.ini to reproduce the issue, assuming only some of the python versions are available in system:

[tox]
envlist =
    py39
    py310
    py311
    py312
    py313
skip_missing_interpreters = true

[testenv]
commands =
    python -c 'print("Test")'
uv_python_preference = only-system

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions