Skip to content

Conversation

@mikaylathompson
Copy link
Contributor

Summary

As described in #12229, pip install with --target or --prefix seem like they should install the necessary python version if it doesn't exist, but they currently don't.

Most minimal reproduction is something like:

> uv python uninstall 3.13
...
> uv pip install anyio --target target-dir --python 3.13
error: No interpreter found for Python 3.13 in virtual environments, managed installations, or search path

This also fails without --target, but a venv is expected in that case, so the with --target/--prefix is the only version that needs to be fixed. The same mechanism occurs for uv pip sync as well.

Test Plan

Added tests for install and sync that failed before fix and now pass.

Signed-off-by: Mikayla Thompson <mrt@mikayla.codes>
Signed-off-by: Mikayla Thompson <mrt@mikayla.codes>
Signed-off-by: Mikayla Thompson <mrt@mikayla.codes>
@mikaylathompson mikaylathompson force-pushed the mikayla/pip-install-target-installs-python branch from 5d3cd19 to e4f2ee1 Compare November 12, 2025 00:16
@zanieb
Copy link
Member

zanieb commented Nov 12, 2025

It seems like in uv pip compile we also won't download?

PythonInstallation::find(
&request,
environment_preference,
python_preference,
&cache,
preview,
)

Signed-off-by: Mikayla Thompson <mrt@mikayla.codes>
@zanieb zanieb added the enhancement New feature or improvement to existing functionality label Nov 12, 2025
Signed-off-by: Mikayla Thompson <mrt@mikayla.codes>
@mikaylathompson mikaylathompson merged commit 8881155 into main Nov 12, 2025
99 checks passed
@mikaylathompson mikaylathompson deleted the mikayla/pip-install-target-installs-python branch November 12, 2025 22:42
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Nov 18, 2025
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [astral-sh/uv](https://github.com/astral-sh/uv) | patch | `0.9.9` -> `0.9.10` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>astral-sh/uv (astral-sh/uv)</summary>

### [`v0.9.10`](https://github.com/astral-sh/uv/blob/HEAD/CHANGELOG.md#0910)

[Compare Source](astral-sh/uv@0.9.9...0.9.10)

Released on 2025-11-17.

##### Enhancements

- Add support for `SSL_CERT_DIR` ([#&#8203;16473](astral-sh/uv#16473))
- Enforce UTF‑8-encoded license files during `uv build` ([#&#8203;16699](astral-sh/uv#16699))
- Error when a `project.license-files` glob matches nothing ([#&#8203;16697](astral-sh/uv#16697))
- `pip install --target` (and `sync`) install Python if necessary ([#&#8203;16694](astral-sh/uv#16694))
- Account for `python_downloads_json_url` in pre-release Python version warnings ([#&#8203;16737](astral-sh/uv#16737))
- Support HTTP/HTTPS URLs in `uv python --python-downloads-json-url` ([#&#8203;16542](astral-sh/uv#16542))

##### Preview features

- Add support for `--upgrade` in `uv python install` ([#&#8203;16676](astral-sh/uv#16676))
- Fix handling of `python install --default` for pre-release Python versions ([#&#8203;16706](astral-sh/uv#16706))
- Add `uv workspace list` to list workspace members ([#&#8203;16691](astral-sh/uv#16691))

##### Bug fixes

- Don't check file URLs for ambiguously parsed credentials ([#&#8203;16759](astral-sh/uv#16759))

##### Documentation

- Add a "storage" reference document ([#&#8203;15954](astral-sh/uv#15954))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4xNzMuMSIsInVwZGF0ZWRJblZlciI6IjQxLjE3My4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or improvement to existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants