-
Notifications
You must be signed in to change notification settings - Fork 2.9k
uv tool reports "missing a valid environment" even after re-installing #17907
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Summary
The following occurs after I had ran uv python upgrade and uv python uninstall to remove the previous minor version.
PS C:\Users\User> uv tool upgrade ty --verbose
DEBUG uv 0.10.0 (0ba432459 2026-02-05)
DEBUG Acquired shared lock for `C:\Users\User\AppData\Local\uv\cache`
DEBUG Acquired exclusive lock for `AppData\Roaming\uv\tools`
DEBUG Upgrading tool: `ty`
DEBUG Checking for Python environment at: `AppData\Roaming\uv\tools\ty`
error: Failed to upgrade ty
Caused by: `ty` is missing a valid environment; run `uv tool install --force ty` to reinstall
DEBUG Released lock at `C:\Users\User\AppData\Roaming\uv\tools\.lock`
DEBUG Released lock at `C:\Users\User\AppData\Local\uv\cache\.lock`
After performing the suggested install --force:
PS C:\Users\User> uv tool install --force ty --verbose
DEBUG uv 0.10.0 (0ba432459 2026-02-05)
DEBUG Acquired shared lock for `C:\Users\User\AppData\Local\uv\cache`
DEBUG Using request connect timeout of 10s and read timeout of 30s
DEBUG Searching for default Python interpreter in managed installations
DEBUG Searching for managed installations at `AppData\Roaming\uv\python`
DEBUG Found managed installation `cpython-3.14.3-windows-x86_64-none`
DEBUG Found `cpython-3.14.3-windows-x86_64-none` at `C:\Users\User\AppData\Roaming\uv\python\cpython-3.14-windows-x86_64-none\python.exe` (managed installations)
DEBUG Acquired exclusive lock for `AppData\Roaming\uv\tools`
DEBUG Checking for Python environment at: `AppData\Roaming\uv\tools\ty`
DEBUG Found existing environment for tool `ty`: AppData\Roaming\uv\tools\ty
DEBUG Using request connect timeout of 10s and read timeout of 30s
DEBUG Solving with installed Python version: 3.14.2
DEBUG Solving with target Python version: >=3.14.2
DEBUG Adding direct dependency: ty*
DEBUG Acquired exclusive lock for `C:\Users\User\AppData\Local\uv\cache\simple-v20\pypi\ty.lock`
DEBUG Found fresh response for: https://pypi.org/simple/ty/
DEBUG Released lock at `C:\Users\User\AppData\Local\uv\cache\simple-v20\pypi\ty.lock`
DEBUG Searching for a compatible version of ty (*)
DEBUG Selecting: ty==0.0.15 [compatible] (ty-0.0.15-py3-none-win_amd64.whl)
DEBUG Acquired exclusive lock for `C:\Users\User\AppData\Local\uv\cache\wheels-v6\pypi\ty\ty-0.0.15-py3-none-win_amd64.lock`
DEBUG Found fresh response for: https://files.pythonhosted.org/packages/84/6e/08a4aedebd2a6ce2784b5bc3760e43d1861f1a184734a78215c2d397c1df/ty-0.0.15-py3-none-win_amd64.whl.metadata
DEBUG Released lock at `C:\Users\User\AppData\Local\uv\cache\wheels-v6\pypi\ty\ty-0.0.15-py3-none-win_amd64.lock`
DEBUG Tried 1 versions: ty 1
DEBUG marker environment resolution took 0.002s
Resolved 1 package in 2ms
DEBUG Registry requirement already cached: ty==0.0.15
DEBUG Uninstalled ty (10 files, 3 directories)
Uninstalled 1 package in 1ms
Installed 1 package in 9ms
~ ty==0.0.15
DEBUG Removing executable: `C:/Users/User/.local/bin/ty.exe`
DEBUG Installing tool executables into: .local\bin
DEBUG Installing entrypoints for tool `ty`
DEBUG Looking at `.dist-info` at: AppData\Roaming\uv\tools\ty\Lib\site-packages\ty-0.0.15.dist-info
DEBUG Installing executable: `ty.exe`
Installed 1 executable: ty
DEBUG Adding receipt for tool `ty`
DEBUG Adding metadata entry for tool `ty` at AppData\Roaming\uv\tools\ty\uv-receipt.toml
DEBUG Released lock at `C:\Users\User\AppData\Roaming\uv\tools\.lock`
DEBUG Released lock at `C:\Users\User\AppData\Local\uv\cache\.lock`
When re-running the upgrade command, the output is the same as the first time, and no upgrade is performed.
Contents of uv.toml:
python-preference = "only-managed"
python-downloads = "automatic"
[pip]
no-annotate = true
no-header = true
Output of uv python list --verbose
DEBUG uv 0.10.0 (0ba432459 2026-02-05)
DEBUG Acquired shared lock for `C:\Users\User\AppData\Local\uv\cache`
DEBUG Using request connect timeout of 10s and read timeout of 30s
DEBUG Searching for any Python interpreter in managed installations
DEBUG Searching for managed installations at `AppData\Roaming\uv\python`
DEBUG Found managed installation `cpython-3.14.3-windows-x86_64-none`
DEBUG Found `cpython-3.14.3-windows-x86_64-none` at `C:\Users\User\AppData\Roaming\uv\python\cpython-3.14-windows-x86_64-none\python.exe` (managed installations)
DEBUG Found managed installation `cpython-3.13.12-windows-x86_64-none`
DEBUG Found `cpython-3.13.12-windows-x86_64-none` at `C:\Users\User\AppData\Roaming\uv\python\cpython-3.13-windows-x86_64-none\python.exe` (managed installations)
cpython-3.15.0a5-windows-x86_64-none <download available>
cpython-3.15.0a5+freethreaded-windows-x86_64-none <download available>
cpython-3.14.3-windows-x86_64-none AppData\Roaming\uv\python\cpython-3.14-windows-x86_64-none\python.exe
cpython-3.14.3+freethreaded-windows-x86_64-none <download available>
cpython-3.13.12-windows-x86_64-none AppData\Roaming\uv\python\cpython-3.13-windows-x86_64-none\python.exe
cpython-3.13.12+freethreaded-windows-x86_64-none <download available>
cpython-3.12.12-windows-x86_64-none <download available>
cpython-3.11.14-windows-x86_64-none <download available>
cpython-3.10.19-windows-x86_64-none <download available>
cpython-3.9.25-windows-x86_64-none <download available>
cpython-3.8.20-windows-x86_64-none <download available>
pypy-3.11.13-windows-x86_64-none <download available>
pypy-3.10.16-windows-x86_64-none <download available>
pypy-3.9.19-windows-x86_64-none <download available>
pypy-3.8.16-windows-x86_64-none <download available>
graalpy-3.12.0-windows-x86_64-none <download available>
graalpy-3.11.0-windows-x86_64-none <download available>
graalpy-3.10.0-windows-x86_64-none <download available>
I had installed Python 3.14 using the --default flag.
Platform
Windows 10 x86_64
Version
uv 0.10.0 (0ba4324 2026-02-05)
Python version
Python 3.14.3
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working