uv install python on Windows fails during archive extraction
If I call uv python install 3.12 on W11 with uv 0.3.0, I get:
Searching for Python versions matching: Python 3.12
cpython-3.12.5-windows-x86_64-none ------------------------------ 4.47 MB/23.57 MB
error: Failed to install cpython-3.12.5-windows-x86_64-none: Failed to extract archive: cpython-3.12.5%2B20240814-x86_64-pc-windows-msvc-install_only_stripped.tar.gz
I tried it multiple times and every time I get the same issue. However when I add -vv to make it verbose, I will install without issues.
I could reproduce it for Python 3.11 also.
After the retry, it works
It might be antivirus, it can do weird things interrupting large zip files. cc @charliermarsh
Running: uv python install 3.8.5
I get error:
Searching for Python versions matching: Python 3.8.5
cpython-3.8.5-windows-x86_64-none ------------------------------ 20.97 MB/32.45 MB error: Failed to install cpython-3.8.5-windows-x86_64-none
Caused by: Failed to extract archive: cpython-3.8.5-x86_64-pc-windows-msvc-shared-pgo-20200830T2254.tar.zst
I am using: uv 0.3.5 (6c62d9fbf 2024-08-27)
On Windows 10.
I re-ran the same command: uv python install 3.8.5
a second time and it worked with no other changes.
I can confirm that this could be 'fixed' by just running multiple times. Third time was the charm in my case. Seems very believable to me that it was caused by some kind of corporate snake oil. Never saw the error on my private machines.
We now retry these -- which may help? I'll close, but we can re-open if we get more reports.
This still occurs in Windows 11. I tried with uv 0.7.x or uv 0.8.x.
uv python install --native-tls --install-dir C:\users\readacted\python 3.14
cpython-3.14.0b3-windows-x86_64-none (download) ------------------------------ 20.19 MiB/20.69 MiB error: Failed to install cpython-3.14.0b3-windows-x86_64-none
Caused by: Failed to extract archive: cpython-3.14.0b3-20250630-x86_64-pc-windows-msvc-install_only_stripped.tar.gz
Caused by: failed to unpack `\\?\C:\Users\redacted\python\.temp\.tmpM4UCgj\python\vcruntime140_1.dll`
Caused by: failed to unpack `python/vcruntime140_1.dll` into `\\?\C:\Users\redacted\python\.temp\.tmpM4UCgj\python\vcruntime140_1.dll`
Caused by: error decoding response body
Caused by: request or response body error
Caused by: operation timed out
But strangely the workaround is to create a venv anywhere like so:
uv venv --native-tls --python=3.14 venv\py314
Confirm the python is now installed
uv python list
cpython-3.14.0b3-windows-x86_64-none AppData\Roaming\uv\python\cpython-3.14.0b3-windows-x86_64-none\python.exe
cpython-3.14.0b3+freethreaded-windows-x86_64-none <download available>
cpython-3.13.5-windows-x86_64-none <download available>
[...]
Check if it works
AppData\Roaming\uv\python\cpython-3.14.0b3-windows-x86_64-none\python.exe
Python 3.14.0b3 (main, Jun 29 2025, 16:17:35) [MSC v.1944 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
This may be as some pointed out due to Windows Defender on this particular machine, which is in a corporate environment. But why it works via the venv command then?
Does this happen consistently, or only sporadically? If consistently, it's a different problem, either network or filesystem policy. In this case, please open a new issue. If it happens sporadically, we now track this is in https://github.com/astral-sh/uv/issues/14069.