mirror of
https://github.com/astral-sh/uv.git
synced 2025-10-28 18:54:10 +00:00
Accept (e.g.) 'python3.8' as --python argument (#2031)
## Summary This PR aligns the `uv pip install --python` flag with the `uv venv --python` flag, such that the former now accepts binary names and Python versions by way of using the same `find_requested_python` method under the hood.
This commit is contained in:
parent
995fba8fec
commit
23afa09fae
6 changed files with 60 additions and 42 deletions
|
|
@ -28,7 +28,9 @@ pub enum Error {
|
|||
#[error("No versions of Python could be found. Is Python installed?")]
|
||||
PythonNotFound,
|
||||
#[error("Failed to locate a virtualenv or Conda environment (checked: `VIRTUAL_ENV`, `CONDA_PREFIX`, and `.venv`). Run `uv venv` to create a virtualenv.")]
|
||||
NotFound,
|
||||
VenvNotFound,
|
||||
#[error("Failed to locate Python interpreter at: `{0}`")]
|
||||
RequestedPythonNotFound(String),
|
||||
#[error(transparent)]
|
||||
Io(#[from] io::Error),
|
||||
#[error("Failed to query python interpreter `{interpreter}`")]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue