You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
uv-managed interpreters are not discovered on macOS: wrong store directory #109
This was discovered looking into wntrblm/nox#1139. Report from that investigation below.
🤖 AI text below 🤖
Problem
_propose_from_uv falls back to platformdirs.user_data_path("uv") / "python" when neither UV_PYTHON_INSTALL_DIR nor XDG_DATA_HOME is set. On macOS that is ~/Library/Application Support/uv/python, but uv intentionally follows the XDG convention on macOS and stores interpreters in ~/.local/share/uv/python:
$ uv python dir/Users/me/.local/share/uv/python
So on macOS the uv store is silently invisible to discovery. The interpreters are only found via the ~/.local/bin shims on PATH (which users can disable, and which downstreams such as nox are moving to suppress: wntrblm/nox#1139).
Reproduction (macOS, python-discovery 1.5.0)
With cpython-3.8.20-macos-aarch64-none present in ~/.local/share/uv/python and ~/.local/bin removed from PATH:
importosos.environ['PATH'] =':'.join(pforpinos.environ['PATH'].split(':') if'.local/bin'notinp)
frompython_discoveryimportget_interpreterprint(get_interpreter('3.8')) # Noneos.environ['UV_PYTHON_INSTALL_DIR'] =os.path.expanduser('~/.local/share/uv/python')
print(get_interpreter('3.8')) # found in the uv store
Suggested fix
Replicate uv's directory logic (XDG-style ~/.local/share/uv/python on every non-Windows platform, including macOS) instead of platformdirs. Windows may need a check too — uv uses %APPDATA%\uv\python (Roaming), while platformdirs.user_data_path("uv") points at Local; I have only verified the macOS behavior.
Activity
🐛 fix(uv): match uv's interpreter store lookup
🐛 fix(uv): match uv's interpreter store lookup
🐛 fix(uv): match uv's interpreter store lookup
🐛 fix(uv): match uv's interpreter store lookup
gaborbernat commentedon Jul 31, 2026
https://github.com/tox-dev/python-discovery/releases/tag/1.5.1