uv seems to fail unpacking a source distribution's tar file
Author: EtherianCreated Sep 13, 2026Updated Sep 17, 2026
Labelsneeds-mre
Summary
I'm setting up a Python project that depends on wxPython, but whenever I try to add wxPython to a project, clean or not, I get an error.
❯ uv init
❯ uv add wxpython
Using CPython 3.13.6
Creating virtual environment at: .venv
Resolved 2 packages in 141ms
Built test @ file://<Projects>/test
× Failed to download and build `wxpython==4.3.1`
├─▶ Failed to extract archive: wxpython==4.3.1
├─▶ Invalid tar file
├─▶ failed to unpack `/home/<User>/.cache/uv/sdists-v9/.tmpn1bYGV/wxpython-4.3.1/demo/images.py`
├─▶ failed to unpack `wxpython-4.3.1/demo/images.py` into `/home/<User>/.cache/uv/sdists-v9/.tmpn1bYGV/wxpython-4.3.1/demo/images.py`
├─▶ error decoding response body
├─▶ request or response body error
├─▶ error reading a body from connection
╰─▶ connection reset
The same error happens when I use a different version, e.g. uv add wxpython==4.2.5. The file that fails to unpack changes every time.
But there are several alternatives that do work. Assuming the virtual environment is activated and the latest wxPython source is in ~/Downloads/, each of the below correctly builds and installs wxPython.
❯ python -m pip install wxpython
❯ python -m pip install wxpython==4.2.5
❯ python -m pip install ~/Downloads/wxpython-4.3.1.tar.gz
❯ uv add ~/Downloads/wxpython-4.3.1.tar.gz
Possibly related to #14171
Verbose Log❯ uv add wxpython --verbose
DEBUG Found workspace root: `<Projects>/test`
DEBUG Adding root workspace member: `<Projects>/test`
DEBUG Skipping `pyproject.toml` in `<Projects>/test` (no `[tool]` section)
DEBUG Searching for user configuration in: `/home/<User>/.config/uv/uv.toml`
DEBUG uv 0.12.5 (x86_64-unknown-linux-gnu)
DEBUG Found project root: `<Projects>/test`
DEBUG No workspace root found, using project root
DEBUG Reading Python requests from version file at `<Projects>/test/.python-version`
DEBUG Using Python request `3.13` from version file at `.python-version`
DEBUG Checking for Python environment at: `.venv`
DEBUG The project environment's Python version satisfies the request: `Python 3.13`
DEBUG Using request connect timeout of 10s and read timeout of 30s
DEBUG Found static `pyproject.toml` for: test @ file://<Projects>/test
DEBUG No workspace root found, using project root
DEBUG Solving with installed Python version: 3.13.6
DEBUG Solving with target Python version: >=3.13
DEBUG Adding direct dependency: test*
DEBUG Searching for a compatible version of test @ file://<Projects>/test (*)
DEBUG Adding direct dependency: wxpython*
DEBUG Found stale response for: https://pypi.org/simple/wxpython/
DEBUG Sending revalidation request for: https://pypi.org/simple/wxpython/
DEBUG Found not-modified response for: https://pypi.org/simple/wxpython/
DEBUG Searching for a compatible version of wxpython (*)
DEBUG Found fresh response for: https://files.pythonhosted.org/packages/33/6a/8d748ca1aeeab640adb638d54a7cdd19c209efb9a491f0877671090de505/wxpython-4.3.1-cp313-cp313-macosx_10_13_x86_64.whl.metadata
DEBUG Selecting: wxpython==4.3.1 [compatible] (wxpython-4.3.1-cp313-cp313-macosx_10_13_x86_64.whl)
DEBUG Tried 2 versions: test 1, wxpython 1
DEBUG all marker environments resolution took 0.144s
Resolved 2 packages in 147ms
DEBUG Using request connect timeout of 10s and read timeout of 30s
DEBUG Found static `requires-dist` for: <Projects>/test/
DEBUG No workspace root found, using project root
DEBUG Resolving despite existing lockfile due to mismatched requirements for: `test==0.1.0`
Requested: {Requirement { name: PackageName("wxpython"), extras: [], groups: [], marker: true, source: Registry { specifier: VersionSpecifiers([VersionSpecifier { operator: GreaterThanEqual, version: "4.3.1" }]), index: None, conflict: None }, origin: None }}
Existing: {Requirement { name: PackageName("wxpython"), extras: [], groups: [], marker: true, source: Registry { specifier: VersionSpecifiers([]), index: None, conflict: None }, origin: None }}
DEBUG Found static `pyproject.toml` for: test @ file://<Projects>/test
DEBUG Solving with installed Python version: 3.13.6
DEBUG Solving with target Python version: >=3.13
DEBUG Adding direct dependency: test*
DEBUG Searching for a compatible version of test @ file://<Projects>/test (*)
DEBUG Adding direct dependency: wxpython>=4.3.1
DEBUG Searching for a compatible version of wxpython (>=4.3.1)
DEBUG Selecting: wxpython==4.3.1 [preference] (wxpython-4.3.1-cp313-cp313-macosx_10_13_x86_64.whl)
DEBUG Tried 2 versions: test 1, wxpython 1
DEBUG all marker environments resolution took 0.000s
DEBUG Computed cache info: Timestamp(SystemTime { tv_sec: 1789262393, tv_nsec: 536178800 }), None, None, {}, {"src": Some(Inode(136526))}. Most recently modified: pyproject.toml
DEBUG Identified uncached distribution: test @ file://<Projects>/test
DEBUG Identified uncached distribution: wxpython==4.3.1
DEBUG Using request connect timeout of 10s and read timeout of 30s
DEBUG Computed cache info: Timestamp(SystemTime { tv_sec: 1789262393, tv_nsec: 536178800 }), None, None, {}, {"src": Some(Inode(136526))}. Most recently modified: pyproject.toml
DEBUG Cached revision does not match expected cache info for: test @ file://<Projects>/test
DEBUG No cache entry for: https://files.pythonhosted.org/packages/3d/dd/026f6286f8beefcdd9551ad2e05b4e3edb45e638cdc067db211c53c950ce/wxpython-4.3.1.tar.gz
DEBUG Sending fresh GET request for: https://files.pythonhosted.org/packages/3d/dd/026f6286f8beefcdd9551ad2e05b4e3edb45e638cdc067db211c53c950ce/wxpython-4.3.1.tar.gz
Building test @ file://<Projects>/test
DEBUG Building: test @ file://<Projects>/test
DEBUG Performing direct build for test @ file://<Projects>/test
DEBUG Wheel excludes: ["__pycache__", "*.pyc", "*.pyo"]
DEBUG Writing wheel at /home/<User>/.cache/uv/builds-v0/.tmpoh5rce/test-0.1.0-py3-none-any.whl
DEBUG Adding pth file to /home/<User>/.cache/uv/builds-v0/.tmpoh5rce/test-0.1.0-py3-none-any.whl
DEBUG Source root: src
DEBUG Module path: test
DEBUG Adding metadata files to: /home/<User>/.cache/uv/builds-v0/.tmpoh5rce/test-0.1.0-py3-none-any.whl
DEBUG Built `test @ file://<Projects>/test` into `test-0.1.0-py3-none-any.whl`
Built test @ file://<Projects>/test
DEBUG Downloading source distribution: wxpython==4.3.1
DEBUG Transient failure while handling response from https://files.pythonhosted.org/packages/3d/dd/026f6286f8beefcdd9551ad2e05b4e3edb45e638cdc067db211c53c950ce/wxpython-4.3.1.tar.gz; retrying after 1.4s...
DEBUG No cache entry for: https://files.pythonhosted.org/packages/3d/dd/026f6286f8beefcdd9551ad2e05b4e3edb45e638cdc067db211c53c950ce/wxpython-4.3.1.tar.gz
DEBUG Sending fresh GET request for: https://files.pythonhosted.org/packages/3d/dd/026f6286f8beefcdd9551ad2e05b4e3edb45e638cdc067db211c53c950ce/wxpython-4.3.1.tar.gz
DEBUG Downloading source distribution: wxpython==4.3.1
DEBUG Transient failure while handling response from https://files.pythonhosted.org/packages/3d/dd/026f6286f8beefcdd9551ad2e05b4e3edb45e638cdc067db211c53c950ce/wxpython-4.3.1.tar.gz; retrying after 3.1s...
DEBUG No cache entry for: https://files.pythonhosted.org/packages/3d/dd/026f6286f8beefcdd9551ad2e05b4e3edb45e638cdc067db211c53c950ce/wxpython-4.3.1.tar.gz
DEBUG Sending fresh GET request for: https://files.pythonhosted.org/packages/3d/dd/026f6286f8beefcdd9551ad2e05b4e3edb45e638cdc067db211c53c950ce/wxpython-4.3.1.tar.gz
DEBUG Downloading source distribution: wxpython==4.3.1
DEBUG Transient failure while handling response from https://files.pythonhosted.org/packages/3d/dd/026f6286f8beefcdd9551ad2e05b4e3edb45e638cdc067db211c53c950ce/wxpython-4.3.1.tar.gz; retrying after 6.3s...
DEBUG No cache entry for: https://files.pythonhosted.org/packages/3d/dd/026f6286f8beefcdd9551ad2e05b4e3edb45e638cdc067db211c53c950ce/wxpython-4.3.1.tar.gz
DEBUG Sending fresh GET request for: https://files.pythonhosted.org/packages/3d/dd/026f6286f8beefcdd9551ad2e05b4e3edb45e638cdc067db211c53c950ce/wxpython-4.3.1.tar.gz
DEBUG Downloading source distribution: wxpython==4.3.1
DEBUG Reverting changes to `pyproject.toml`
DEBUG Removing `uv.lock`
× Failed to download and build `wxpython==4.3.1`
├─▶ Failed to extract archive: wxpython==4.3.1
├─▶ Invalid tar file
├─▶ failed to unpack `/home/<User>/.cache/uv/sdists-v9/.tmphVeJmW/wxpython-4.3.1/docs/phoenix-fire-md.png`
├─▶ failed to unpack `wxpython-4.3.1/docs/phoenix-fire-md.png` into `/home/<User>/.cache/uv/sdists-v9/.tmphVeJmW/wxpython-4.3.1/docs/phoenix-fire-md.png`
├─▶ error decoding response body
├─▶ request or response body error
├─▶ error reading a body from connection
╰─▶ connection reset
hint: `wxpython` (v4.3.1) was included because `test` (v0.1.0) depends on `wxpython`
hint: If you want to add the package regardless of the failed resolution, provide the `--frozen` flag to skip locking and syncing
Platform
Linux 6.5.0-1mx-ahs-amd64 x86_64 GNU/Linux
Version
uv 0.12.13 (x86_64-unknown-linux-gnu)
Python version
Python 3.13.6
Source: astral-sh/uv