Cover --python <dir> in "Using arbitrary Python environments" (#6457)

Closes https://github.com/astral-sh/uv/issues/6237
This commit is contained in:
Zanie Blue
2026-03-24 08:02:27 -05:00
committed by GitHub
parent 82aa312db5
commit f772f71b91
+4 -4
View File
@@ -97,10 +97,10 @@ regardless of where uv is installed. Note that if `VIRTUAL_ENV` is set to a dire
**not** a [PEP 405 compliant](https://peps.python.org/pep-0405/#specification) virtual environment,
it will be ignored.
uv can also install into arbitrary, even non-virtual environments, with the `--python` argument
provided to `uv pip sync` or `uv pip install`. For example,
`uv pip install --python /path/to/python` will install into the environment linked to the
`/path/to/python` interpreter.
uv can also install into arbitrary, even non-virtual environments, with the `--python` option. For
example, `uv pip install --python /path/to/python` will install into the environment linked to the
`/path/to/python` interpreter regardless of whether or not it is a virtual environment. The
`--python` option also accepts a path to the root directory of a virtual environment.
For convenience, `uv pip install --system` will install into the system Python environment. Using
`--system` is roughly equivalent to `uv pip install --python $(which python)`, but note that