Open stephen-hansen opened 1 week ago
Thanks for the report! I think I might have fixed this at https://github.com/astral-sh/uv/pull/8733/files#diff-8f66fe82438d145b8def0f37cef57e6c4f874bacf87367476f4e7d06d3a3480aR390 though I'll need to look closer to confirm.
Similar issue. If I run
uv python install 3.11 3.12
I get the message
All requested versions already installed
But the above python versions are listed as "download available" when I run uv python list
. So those python versions were actually not installed for me. Using the debug flag shows request failures. This is likely an issue on my end, but the "All requested versions already installed" message was confusing.
I'm running uv
version 0.4.29
Hi,
Apologies if this is a duplicate bug report but I can't find any issue similar to this in the past week. I'm on the latest uv tag (
uv --version
==uv 0.4.29
) on Linux and it seems that sometimesuv python install x.y
command fails silently with no error and returns a zero exit code.For my setup I have XDG_CACHE_HOME and XDG_DATA_HOME exported to point outside my home directory due to storage limits. Supposing I have XDG_DATA_HOME set to
/path/to/my/.local/share
then according touv
,uv python dir
yields/path/to/my/.local/share/uv/python
anduv python dir --bin
yields/path/to/my/.local/share/../bin
. As expected from the docs. Except I only have the former path as a valid directory on my system. The--bin
preview path does not exist. Originally when writing this issue I suspected the missing bin path to be the issue, but not 100% sure on that. I will say I do see this issue more often than not when the bin directory does not exist (even without--preview
), but it's not consistent.When I run e.g. the following command I get the following verbose output:
But the install isn't listed under
uv python list
. Likewise no error reported in the logs above and zero exit code.Running the command a second time sometimes works:
I think I'm hitting an error somewhere between here and here. Maybe a transient extraction error due to something in my environment.
Reading the source (apologies for any mistakes here, it's been many years since I last wrote Rust), I think any errors on extraction are populated here. Since the one install failed, the changelog is empty. We then get to this line, where the changelog is empty. Since I'm not doing a default Python version install and since only one version was requested, nothing gets reported. And then we return Ok with ExitStatus::Success.
We can actually see this is happening by re-running a default Python install over and over until we get the same failure on extraction:
Note "Python is already installed. Use
uv python install <request>
to install another version." is printed here, but we don't actually have it inuv python list --only-installed
.I suspect there are probably other kinds of errors that can happen in
fetch
that are more reproducible and would likewise not get reported.