diff --git a/crates/uv-cli/src/lib.rs b/crates/uv-cli/src/lib.rs index 3e333d76a..5a37452ee 100644 --- a/crates/uv-cli/src/lib.rs +++ b/crates/uv-cli/src/lib.rs @@ -134,21 +134,44 @@ pub struct TopLevelArgs { #[command(next_help_heading = "Global options", next_display_order = 1000)] #[allow(clippy::struct_excessive_bools)] pub struct GlobalArgs { - /// Whether to prefer uv-managed or system Python installations. - /// - /// By default, uv prefers using Python versions it manages. However, it - /// will use system Python installations if a uv-managed Python is not - /// installed. This option allows prioritizing or ignoring system Python - /// installations. #[arg( global = true, long, help_heading = "Python options", display_order = 700, - env = EnvVars::UV_PYTHON_PREFERENCE + env = EnvVars::UV_PYTHON_PREFERENCE, + hide = true )] pub python_preference: Option, + /// Require use of uv-managed Python versions. + /// + /// By default, uv prefers using Python versions it manages. However, it + /// will use system Python versions if a uv-managed Python is not + /// installed. This option disables use of system Python versions. + #[arg( + global = true, + long, + help_heading = "Python options", + env = EnvVars::UV_MANAGED_PYTHON, + overrides_with = "no_managed_python", + conflicts_with = "python_preference" + )] + pub managed_python: bool, + + /// Disable use of uv-managed Python versions. + /// + /// Instead, uv will search for a suitable Python version on the system. + #[arg( + global = true, + long, + help_heading = "Python options", + env = EnvVars::UV_NO_MANAGED_PYTHON, + overrides_with = "managed_python", + conflicts_with = "python_preference" + )] + pub no_managed_python: bool, + #[allow(clippy::doc_markdown)] /// Allow automatically downloading Python when required. [env: "UV_PYTHON_DOWNLOADS=auto"] #[arg(global = true, long, help_heading = "Python options", hide = true)] @@ -4419,8 +4442,9 @@ pub enum PythonCommand { /// By default, installed Python versions and the downloads for latest available patch version /// of each supported Python major version are shown. /// - /// The displayed versions are filtered by the `--python-preference` option, i.e., if using - /// `only-system`, no managed Python versions will be shown. + /// Use `--managed-python` to view only managed Python versions. + /// + /// Use `--no-managed-python` to omit managed Python versions. /// /// Use `--all-versions` to view all available patch versions. /// diff --git a/crates/uv-static/src/env_vars.rs b/crates/uv-static/src/env_vars.rs index 1449990f3..6ceafb5d0 100644 --- a/crates/uv-static/src/env_vars.rs +++ b/crates/uv-static/src/env_vars.rs @@ -140,10 +140,15 @@ impl EnvVars { /// exclude distributions published after the specified date. pub const UV_EXCLUDE_NEWER: &'static str = "UV_EXCLUDE_NEWER"; - /// Equivalent to the `--python-preference` command-line argument. Whether uv - /// should prefer system or managed Python versions. + /// Whether uv should prefer system or managed Python versions. pub const UV_PYTHON_PREFERENCE: &'static str = "UV_PYTHON_PREFERENCE"; + /// Require use of uv-managed Python versions. + pub const UV_MANAGED_PYTHON: &'static str = "UV_MANAGED_PYTHON"; + + /// Disable use of uv-managed Python versions. + pub const UV_NO_MANAGED_PYTHON: &'static str = "UV_NO_MANAGED_PYTHON"; + /// Equivalent to the /// [`python-downloads`](../reference/settings.md#python-downloads) setting and, when disabled, the /// `--no-python-downloads` option. Whether uv should allow Python downloads. diff --git a/crates/uv/src/settings.rs b/crates/uv/src/settings.rs index 662a53fed..b42053571 100644 --- a/crates/uv/src/settings.rs +++ b/crates/uv/src/settings.rs @@ -73,6 +73,7 @@ impl GlobalSettings { /// Resolve the [`GlobalSettings`] from the CLI and filesystem configuration. pub(crate) fn resolve(args: &GlobalArgs, workspace: Option<&FilesystemOptions>) -> Self { let network_settings = NetworkSettings::resolve(args, workspace); + let python_preference = resolve_python_preference(args, workspace); Self { required_version: workspace .and_then(|workspace| workspace.globals.required_version.clone()), @@ -120,10 +121,7 @@ impl GlobalSettings { .combine(workspace.and_then(|workspace| workspace.globals.preview)) .unwrap_or(false), ), - python_preference: args - .python_preference - .combine(workspace.and_then(|workspace| workspace.globals.python_preference)) - .unwrap_or_default(), + python_preference, python_downloads: flag(args.allow_python_downloads, args.no_python_downloads) .map(PythonDownloads::from) .combine(env(env::UV_PYTHON_DOWNLOADS)) @@ -137,6 +135,21 @@ impl GlobalSettings { } } +fn resolve_python_preference( + args: &GlobalArgs, + workspace: Option<&FilesystemOptions>, +) -> PythonPreference { + if args.managed_python { + PythonPreference::OnlyManaged + } else if args.no_managed_python { + PythonPreference::OnlySystem + } else { + args.python_preference + .combine(workspace.and_then(|workspace| workspace.globals.python_preference)) + .unwrap_or_default() + } +} + /// The resolved network settings to use for any invocation of the CLI. #[derive(Debug, Clone)] pub(crate) struct NetworkSettings { diff --git a/crates/uv/tests/it/help.rs b/crates/uv/tests/it/help.rs index 2aeeb9ea2..55660be30 100644 --- a/crates/uv/tests/it/help.rs +++ b/crates/uv/tests/it/help.rs @@ -7,7 +7,7 @@ fn help() { let context = TestContext::new_with_versions(&[]); // The `uv help` command should show the long help message - uv_snapshot!(context.filters(), context.help(), @r###" + uv_snapshot!(context.filters(), context.help(), @r#" success: true exit_code: 0 ----- stdout ----- @@ -42,11 +42,10 @@ fn help() { --cache-dir [CACHE_DIR] Path to the cache directory [env: UV_CACHE_DIR=] Python options: - --python-preference - Whether to prefer uv-managed or system Python installations [env: UV_PYTHON_PREFERENCE=] - [possible values: only-managed, managed, system, only-system] - --no-python-downloads - Disable automatic downloads of Python. [env: "UV_PYTHON_DOWNLOADS=never"] + --managed-python Require use of uv-managed Python versions [env: UV_MANAGED_PYTHON=] + --no-managed-python Disable use of uv-managed Python versions [env: UV_NO_MANAGED_PYTHON=] + --no-python-downloads Disable automatic downloads of Python. [env: + "UV_PYTHON_DOWNLOADS=never"] Global options: -q, --quiet @@ -81,14 +80,14 @@ fn help() { ----- stderr ----- - "###); + "#); } #[test] fn help_flag() { let context = TestContext::new_with_versions(&[]); - uv_snapshot!(context.filters(), context.command().arg("--help"), @r###" + uv_snapshot!(context.filters(), context.command().arg("--help"), @r#" success: true exit_code: 0 ----- stdout ----- @@ -122,11 +121,10 @@ fn help_flag() { --cache-dir [CACHE_DIR] Path to the cache directory [env: UV_CACHE_DIR=] Python options: - --python-preference - Whether to prefer uv-managed or system Python installations [env: UV_PYTHON_PREFERENCE=] - [possible values: only-managed, managed, system, only-system] - --no-python-downloads - Disable automatic downloads of Python. [env: "UV_PYTHON_DOWNLOADS=never"] + --managed-python Require use of uv-managed Python versions [env: UV_MANAGED_PYTHON=] + --no-managed-python Disable use of uv-managed Python versions [env: UV_NO_MANAGED_PYTHON=] + --no-python-downloads Disable automatic downloads of Python. [env: + "UV_PYTHON_DOWNLOADS=never"] Global options: -q, --quiet @@ -160,14 +158,14 @@ fn help_flag() { Use `uv help` for more details. ----- stderr ----- - "###); + "#); } #[test] fn help_short_flag() { let context = TestContext::new_with_versions(&[]); - uv_snapshot!(context.filters(), context.command().arg("-h"), @r###" + uv_snapshot!(context.filters(), context.command().arg("-h"), @r#" success: true exit_code: 0 ----- stdout ----- @@ -201,11 +199,10 @@ fn help_short_flag() { --cache-dir [CACHE_DIR] Path to the cache directory [env: UV_CACHE_DIR=] Python options: - --python-preference - Whether to prefer uv-managed or system Python installations [env: UV_PYTHON_PREFERENCE=] - [possible values: only-managed, managed, system, only-system] - --no-python-downloads - Disable automatic downloads of Python. [env: "UV_PYTHON_DOWNLOADS=never"] + --managed-python Require use of uv-managed Python versions [env: UV_MANAGED_PYTHON=] + --no-managed-python Disable use of uv-managed Python versions [env: UV_NO_MANAGED_PYTHON=] + --no-python-downloads Disable automatic downloads of Python. [env: + "UV_PYTHON_DOWNLOADS=never"] Global options: -q, --quiet @@ -239,14 +236,14 @@ fn help_short_flag() { Use `uv help` for more details. ----- stderr ----- - "###); + "#); } #[test] fn help_subcommand() { let context = TestContext::new_with_versions(&[]); - uv_snapshot!(context.filters(), context.help().arg("python"), @r###" + uv_snapshot!(context.filters(), context.help().arg("python"), @r#" success: true exit_code: 0 ----- stdout ----- @@ -318,22 +315,21 @@ fn help_subcommand() { [env: UV_CACHE_DIR=] Python options: - --python-preference - Whether to prefer uv-managed or system Python installations. + --managed-python + Require use of uv-managed Python versions. By default, uv prefers using Python versions it manages. However, it will use system - Python installations if a uv-managed Python is not installed. This option allows - prioritizing or ignoring system Python installations. + Python versions if a uv-managed Python is not installed. This option disables use of + system Python versions. - [env: UV_PYTHON_PREFERENCE=] + [env: UV_MANAGED_PYTHON=] - Possible values: - - only-managed: Only use managed Python installations; never use system Python - installations - - managed: Prefer managed Python installations over system Python installations - - system: Prefer system Python installations over managed Python installations - - only-system: Only use system Python installations; never use managed Python - installations + --no-managed-python + Disable use of uv-managed Python versions. + + Instead, uv will search for a suitable Python version on the system. + + [env: UV_NO_MANAGED_PYTHON=] --no-python-downloads Disable automatic downloads of Python. [env: "UV_PYTHON_DOWNLOADS=never"] @@ -447,14 +443,14 @@ fn help_subcommand() { ----- stderr ----- - "###); + "#); } #[test] fn help_subsubcommand() { let context = TestContext::new_with_versions(&[]); - uv_snapshot!(context.filters(), context.help().env_remove(EnvVars::UV_PYTHON_INSTALL_DIR).arg("python").arg("install"), @r###" + uv_snapshot!(context.filters(), context.help().env_remove(EnvVars::UV_PYTHON_INSTALL_DIR).arg("python").arg("install"), @r#" success: true exit_code: 0 ----- stdout ----- @@ -567,22 +563,21 @@ fn help_subsubcommand() { [env: UV_CACHE_DIR=] Python options: - --python-preference - Whether to prefer uv-managed or system Python installations. + --managed-python + Require use of uv-managed Python versions. By default, uv prefers using Python versions it manages. However, it will use system - Python installations if a uv-managed Python is not installed. This option allows - prioritizing or ignoring system Python installations. + Python versions if a uv-managed Python is not installed. This option disables use of + system Python versions. - [env: UV_PYTHON_PREFERENCE=] + [env: UV_MANAGED_PYTHON=] - Possible values: - - only-managed: Only use managed Python installations; never use system Python - installations - - managed: Prefer managed Python installations over system Python installations - - system: Prefer system Python installations over managed Python installations - - only-system: Only use system Python installations; never use managed Python - installations + --no-managed-python + Disable use of uv-managed Python versions. + + Instead, uv will search for a suitable Python version on the system. + + [env: UV_NO_MANAGED_PYTHON=] --no-python-downloads Disable automatic downloads of Python. [env: "UV_PYTHON_DOWNLOADS=never"] @@ -694,14 +689,14 @@ fn help_subsubcommand() { ----- stderr ----- - "###); + "#); } #[test] fn help_flag_subcommand() { let context = TestContext::new_with_versions(&[]); - uv_snapshot!(context.filters(), context.command().arg("python").arg("--help"), @r###" + uv_snapshot!(context.filters(), context.command().arg("python").arg("--help"), @r#" success: true exit_code: 0 ----- stdout ----- @@ -723,11 +718,10 @@ fn help_flag_subcommand() { --cache-dir [CACHE_DIR] Path to the cache directory [env: UV_CACHE_DIR=] Python options: - --python-preference - Whether to prefer uv-managed or system Python installations [env: UV_PYTHON_PREFERENCE=] - [possible values: only-managed, managed, system, only-system] - --no-python-downloads - Disable automatic downloads of Python. [env: "UV_PYTHON_DOWNLOADS=never"] + --managed-python Require use of uv-managed Python versions [env: UV_MANAGED_PYTHON=] + --no-managed-python Disable use of uv-managed Python versions [env: UV_NO_MANAGED_PYTHON=] + --no-python-downloads Disable automatic downloads of Python. [env: + "UV_PYTHON_DOWNLOADS=never"] Global options: -q, --quiet @@ -761,14 +755,14 @@ fn help_flag_subcommand() { Use `uv help python` for more details. ----- stderr ----- - "###); + "#); } #[test] fn help_flag_subsubcommand() { let context = TestContext::new_with_versions(&[]); - uv_snapshot!(context.filters(), context.command().arg("python").arg("install").arg("--help"), @r###" + uv_snapshot!(context.filters(), context.command().arg("python").arg("install").arg("--help"), @r#" success: true exit_code: 0 ----- stdout ----- @@ -796,11 +790,10 @@ fn help_flag_subsubcommand() { --cache-dir [CACHE_DIR] Path to the cache directory [env: UV_CACHE_DIR=] Python options: - --python-preference - Whether to prefer uv-managed or system Python installations [env: UV_PYTHON_PREFERENCE=] - [possible values: only-managed, managed, system, only-system] - --no-python-downloads - Disable automatic downloads of Python. [env: "UV_PYTHON_DOWNLOADS=never"] + --managed-python Require use of uv-managed Python versions [env: UV_MANAGED_PYTHON=] + --no-managed-python Disable use of uv-managed Python versions [env: UV_NO_MANAGED_PYTHON=] + --no-python-downloads Disable automatic downloads of Python. [env: + "UV_PYTHON_DOWNLOADS=never"] Global options: -q, --quiet @@ -832,7 +825,7 @@ fn help_flag_subsubcommand() { Display the uv version ----- stderr ----- - "###); + "#); } #[test] @@ -918,7 +911,7 @@ fn help_unknown_subsubcommand() { fn help_with_global_option() { let context = TestContext::new_with_versions(&[]); - uv_snapshot!(context.filters(), context.help().arg("--no-cache"), @r###" + uv_snapshot!(context.filters(), context.help().arg("--no-cache"), @r#" success: true exit_code: 0 ----- stdout ----- @@ -953,11 +946,10 @@ fn help_with_global_option() { --cache-dir [CACHE_DIR] Path to the cache directory [env: UV_CACHE_DIR=] Python options: - --python-preference - Whether to prefer uv-managed or system Python installations [env: UV_PYTHON_PREFERENCE=] - [possible values: only-managed, managed, system, only-system] - --no-python-downloads - Disable automatic downloads of Python. [env: "UV_PYTHON_DOWNLOADS=never"] + --managed-python Require use of uv-managed Python versions [env: UV_MANAGED_PYTHON=] + --no-managed-python Disable use of uv-managed Python versions [env: UV_NO_MANAGED_PYTHON=] + --no-python-downloads Disable automatic downloads of Python. [env: + "UV_PYTHON_DOWNLOADS=never"] Global options: -q, --quiet @@ -992,7 +984,7 @@ fn help_with_global_option() { ----- stderr ----- - "###); + "#); } #[test] @@ -1034,7 +1026,7 @@ fn help_with_no_pager() { // We can't really test whether the --no-pager option works with a snapshot test. // It's still nice to have a test for the option to confirm the option exists. - uv_snapshot!(context.filters(), context.help().arg("--no-pager"), @r###" + uv_snapshot!(context.filters(), context.help().arg("--no-pager"), @r#" success: true exit_code: 0 ----- stdout ----- @@ -1069,11 +1061,10 @@ fn help_with_no_pager() { --cache-dir [CACHE_DIR] Path to the cache directory [env: UV_CACHE_DIR=] Python options: - --python-preference - Whether to prefer uv-managed or system Python installations [env: UV_PYTHON_PREFERENCE=] - [possible values: only-managed, managed, system, only-system] - --no-python-downloads - Disable automatic downloads of Python. [env: "UV_PYTHON_DOWNLOADS=never"] + --managed-python Require use of uv-managed Python versions [env: UV_MANAGED_PYTHON=] + --no-managed-python Disable use of uv-managed Python versions [env: UV_NO_MANAGED_PYTHON=] + --no-python-downloads Disable automatic downloads of Python. [env: + "UV_PYTHON_DOWNLOADS=never"] Global options: -q, --quiet @@ -1108,5 +1099,5 @@ fn help_with_no_pager() { ----- stderr ----- - "###); + "#); } diff --git a/docs/concepts/python-versions.md b/docs/concepts/python-versions.md index c93622243..73b4510fd 100644 --- a/docs/concepts/python-versions.md +++ b/docs/concepts/python-versions.md @@ -275,24 +275,43 @@ during `uv python install`. [persistent configuration file](../configuration/files.md) to change the default behavior, or the `--no-python-downloads` flag can be passed to any uv command. -## Adjusting Python version preferences +## Requiring or disabling managed Python versions By default, uv will attempt to use Python versions found on the system and only download managed -interpreters when necessary. +Python versions when necessary. To ignore system Python versions, and only use managed Python +versions, use the `--managed-python` flag: -The [`python-preference`](../reference/settings.md#python-preference) option can be used to adjust -this behavior. By default, it is set to `managed` which prefers managed Python installations over -system Python installations. However, system Python installations are still preferred over +```console +$ uv python list --managed-python +``` + +Similarly, to ignore managed Python versions and only use system Python versions, use the +`--no-managed-python` flag: + +```console +$ uv python list --no-managed-python +``` + +To change uv's default behavior in a configuration file, use the +[`python-preference` setting](#adjusting-python-version-preferences). + +## Adjusting Python version preferences + +The [`python-preference`](../reference/settings.md#python-preference) setting determines whether to +prefer using Python installations that are already present on the system, or those that are +downloaded and installed by uv. + +By default, the `python-preference` is set to `managed` which prefers managed Python installations +over system Python installations. However, system Python installations are still preferred over downloading a managed Python version. The following alternative options are available: -- `only-managed`: Only use managed Python installations; never use system Python installations -- `system`: Prefer system Python installations over managed Python installations -- `only-system`: Only use system Python installations; never use managed Python installations - -These options allow disabling uv's managed Python versions entirely or always using them and -ignoring any existing system installations. +- `only-managed`: Only use managed Python installations; never use system Python installations. + Equivalent to `--managed-python`. +- `system`: Prefer system Python installations over managed Python installations. +- `only-system`: Only use system Python installations; never use managed Python installations. + Equivalent to `--no-managed-python`. !!! note diff --git a/docs/configuration/environment.md b/docs/configuration/environment.md index e4ae80ce0..3113d4ba9 100644 --- a/docs/configuration/environment.md +++ b/docs/configuration/environment.md @@ -179,6 +179,10 @@ Add additional context and structure to log messages. If logging is not enabled, e.g., with `RUST_LOG` or `-v`, this has no effect. +### `UV_MANAGED_PYTHON` + +Require use of uv-managed Python versions. + ### `UV_NATIVE_TLS` Equivalent to the `--native-tls` command-line argument. If set to `true`, uv will @@ -229,6 +233,10 @@ Ignore `.env` files when executing `uv run` commands. Skip writing `uv` installer metadata files (e.g., `INSTALLER`, `REQUESTED`, and `direct_url.json`) to site-packages `.dist-info` directories. +### `UV_NO_MANAGED_PYTHON` + +Disable use of uv-managed Python versions. + ### `UV_NO_PROGRESS` Equivalent to the `--no-progress` command-line argument. Disables all progress output. For @@ -343,8 +351,7 @@ Distributions can be read from a local directory by using the `file://` URL sche ### `UV_PYTHON_PREFERENCE` -Equivalent to the `--python-preference` command-line argument. Whether uv -should prefer system or managed Python versions. +Whether uv should prefer system or managed Python versions. ### `UV_REQUEST_TIMEOUT` diff --git a/docs/guides/install-python.md b/docs/guides/install-python.md index 1b49ed32f..0b80589a5 100644 --- a/docs/guides/install-python.md +++ b/docs/guides/install-python.md @@ -116,8 +116,8 @@ command invocation. See the [Python discovery](../concepts/python-versions.md#discovery-of-python-versions) documentation for details. -To force uv to use the system Python, provide the `--python-preference only-system` option. See the -[Python version preference](../concepts/python-versions.md#adjusting-python-version-preferences) +To force uv to use the system Python, provide the `--no-managed-python` flag. See the +[Python version preference](../concepts/python-versions.md#requiring-or-disabling-managed-python-versions) documentation for more details. ## Next steps diff --git a/docs/reference/cli.md b/docs/reference/cli.md index 57a4b1963..f3793e16f 100644 --- a/docs/reference/cli.md +++ b/docs/reference/cli.md @@ -284,6 +284,11 @@ uv run [OPTIONS] [COMMAND]

Requires that the lockfile is up-to-date. If the lockfile is missing or needs to be updated, uv will exit with an error.

May also be set with the UV_LOCKED environment variable.

+
--managed-python

Require use of uv-managed Python versions.

+ +

By default, uv prefers using Python versions it manages. However, it will use system Python versions if a uv-managed Python is not installed. This option disables use of system Python versions.

+ +

May also be set with the UV_MANAGED_PYTHON environment variable.

--module, -m

Run a Python module.

Equivalent to python -m <module>.

@@ -355,6 +360,11 @@ uv run [OPTIONS] [COMMAND]
--no-index

Ignore the registry index (e.g., PyPI), instead relying on direct URL dependencies and those provided via --find-links

+
--no-managed-python

Disable use of uv-managed Python versions.

+ +

Instead, uv will search for a suitable Python version on the system.

+ +

May also be set with the UV_NO_MANAGED_PYTHON environment variable.

--no-progress

Hide all progress outputs.

For example, spinners or progress bars.

@@ -431,22 +441,6 @@ uv run [OPTIONS] [COMMAND]

See uv python to view supported request formats.

May also be set with the UV_PYTHON environment variable.

-
--python-preference python-preference

Whether to prefer uv-managed or system Python installations.

- -

By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.

- -

May also be set with the UV_PYTHON_PREFERENCE environment variable.

-

Possible values:

- -
    -
  • only-managed: Only use managed Python installations; never use system Python installations
  • - -
  • managed: Prefer managed Python installations over system Python installations
  • - -
  • system: Prefer system Python installations over managed Python installations
  • - -
  • only-system: Only use system Python installations; never use managed Python installations
  • -
--quiet, -q

Do not print any output

--refresh

Refresh all cached data

@@ -623,6 +617,11 @@ uv init [OPTIONS] [PATH]

A library is a project that is intended to be built and distributed as a Python package.

+
--managed-python

Require use of uv-managed Python versions.

+ +

By default, uv prefers using Python versions it manages. However, it will use system Python versions if a uv-managed Python is not installed. This option disables use of system Python versions.

+ +

May also be set with the UV_MANAGED_PYTHON environment variable.

--name name

The name of the project.

Defaults to the name of the directory.

@@ -644,6 +643,11 @@ uv init [OPTIONS] [PATH]

May also be set with the UV_NO_CONFIG environment variable.

--no-description

Disable the description for the project

+
--no-managed-python

Disable use of uv-managed Python versions.

+ +

Instead, uv will search for a suitable Python version on the system.

+ +

May also be set with the UV_NO_MANAGED_PYTHON environment variable.

--no-package

Do not set up the project to be built as a Python package.

Does not include a [build-system] for the project.

@@ -695,22 +699,6 @@ uv init [OPTIONS] [PATH]

See uv python to view supported request formats.

May also be set with the UV_PYTHON environment variable.

-
--python-preference python-preference

Whether to prefer uv-managed or system Python installations.

- -

By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.

- -

May also be set with the UV_PYTHON_PREFERENCE environment variable.

-

Possible values:

- -
    -
  • only-managed: Only use managed Python installations; never use system Python installations
  • - -
  • managed: Prefer managed Python installations over system Python installations
  • - -
  • system: Prefer system Python installations over managed Python installations
  • - -
  • only-system: Only use system Python installations; never use managed Python installations
  • -
--quiet, -q

Do not print any output

--script

Create a script.

@@ -958,6 +946,11 @@ uv add [OPTIONS] >

Requires that the lockfile is up-to-date. If the lockfile is missing or needs to be updated, uv will exit with an error.

May also be set with the UV_LOCKED environment variable.

+
--managed-python

Require use of uv-managed Python versions.

+ +

By default, uv prefers using Python versions it manages. However, it will use system Python versions if a uv-managed Python is not installed. This option disables use of system Python versions.

+ +

May also be set with the UV_MANAGED_PYTHON environment variable.

--marker, -m marker

Apply this marker to all added packages

--native-tls

Whether to load TLS certificates from the platform’s native certificate store.

@@ -1002,6 +995,11 @@ uv add [OPTIONS] >

May also be set with the UV_NO_CONFIG environment variable.

--no-index

Ignore the registry index (e.g., PyPI), instead relying on direct URL dependencies and those provided via --find-links

+
--no-managed-python

Disable use of uv-managed Python versions.

+ +

Instead, uv will search for a suitable Python version on the system.

+ +

May also be set with the UV_NO_MANAGED_PYTHON environment variable.

--no-progress

Hide all progress outputs.

For example, spinners or progress bars.

@@ -1060,22 +1058,6 @@ uv add [OPTIONS] >

See uv python for details on Python discovery and supported request formats.

May also be set with the UV_PYTHON environment variable.

-
--python-preference python-preference

Whether to prefer uv-managed or system Python installations.

- -

By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.

- -

May also be set with the UV_PYTHON_PREFERENCE environment variable.

-

Possible values:

- -
    -
  • only-managed: Only use managed Python installations; never use system Python installations
  • - -
  • managed: Prefer managed Python installations over system Python installations
  • - -
  • system: Prefer system Python installations over managed Python installations
  • - -
  • only-system: Only use system Python installations; never use managed Python installations
  • -
--quiet, -q

Do not print any output

--raw-sources

Add source requirements to project.dependencies, rather than tool.uv.sources.

@@ -1325,6 +1307,11 @@ uv remove [OPTIONS] ...

Requires that the lockfile is up-to-date. If the lockfile is missing or needs to be updated, uv will exit with an error.

May also be set with the UV_LOCKED environment variable.

+
--managed-python

Require use of uv-managed Python versions.

+ +

By default, uv prefers using Python versions it manages. However, it will use system Python versions if a uv-managed Python is not installed. This option disables use of system Python versions.

+ +

May also be set with the UV_MANAGED_PYTHON environment variable.

--native-tls

Whether to load TLS certificates from the platform’s native certificate store.

By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).

@@ -1367,6 +1354,11 @@ uv remove [OPTIONS] ...

May also be set with the UV_NO_CONFIG environment variable.

--no-index

Ignore the registry index (e.g., PyPI), instead relying on direct URL dependencies and those provided via --find-links

+
--no-managed-python

Disable use of uv-managed Python versions.

+ +

Instead, uv will search for a suitable Python version on the system.

+ +

May also be set with the UV_NO_MANAGED_PYTHON environment variable.

--no-progress

Hide all progress outputs.

For example, spinners or progress bars.

@@ -1421,22 +1413,6 @@ uv remove [OPTIONS] ...

See uv python for details on Python discovery and supported request formats.

May also be set with the UV_PYTHON environment variable.

-
--python-preference python-preference

Whether to prefer uv-managed or system Python installations.

- -

By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.

- -

May also be set with the UV_PYTHON_PREFERENCE environment variable.

-

Possible values:

- -
    -
  • only-managed: Only use managed Python installations; never use system Python installations
  • - -
  • managed: Prefer managed Python installations over system Python installations
  • - -
  • system: Prefer system Python installations over managed Python installations
  • - -
  • only-system: Only use system Python installations; never use managed Python installations
  • -
--quiet, -q

Do not print any output

--refresh

Refresh all cached data

@@ -1702,6 +1678,11 @@ uv sync [OPTIONS]

Requires that the lockfile is up-to-date. If the lockfile is missing or needs to be updated, uv will exit with an error.

May also be set with the UV_LOCKED environment variable.

+
--managed-python

Require use of uv-managed Python versions.

+ +

By default, uv prefers using Python versions it manages. However, it will use system Python versions if a uv-managed Python is not installed. This option disables use of system Python versions.

+ +

May also be set with the UV_MANAGED_PYTHON environment variable.

--native-tls

Whether to load TLS certificates from the platform’s native certificate store.

By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).

@@ -1776,6 +1757,11 @@ uv sync [OPTIONS]

By default, all of the workspace members and their dependencies are installed into the environment. The --no-install-workspace option allows exclusion of all the workspace members while retaining their dependencies. This is particularly useful in situations like building Docker images where installing the workspace separately from its dependencies allows optimal layer caching.

+
--no-managed-python

Disable use of uv-managed Python versions.

+ +

Instead, uv will search for a suitable Python version on the system.

+ +

May also be set with the UV_NO_MANAGED_PYTHON environment variable.

--no-progress

Hide all progress outputs.

For example, spinners or progress bars.

@@ -1845,22 +1831,6 @@ uv sync [OPTIONS]

See uv python for details on Python discovery and supported request formats.

May also be set with the UV_PYTHON environment variable.

-
--python-preference python-preference

Whether to prefer uv-managed or system Python installations.

- -

By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.

- -

May also be set with the UV_PYTHON_PREFERENCE environment variable.

-

Possible values:

- -
    -
  • only-managed: Only use managed Python installations; never use system Python installations
  • - -
  • managed: Prefer managed Python installations over system Python installations
  • - -
  • system: Prefer system Python installations over managed Python installations
  • - -
  • only-system: Only use system Python installations; never use managed Python installations
  • -
--quiet, -q

Do not print any output

--refresh

Refresh all cached data

@@ -2077,6 +2047,11 @@ uv lock [OPTIONS]
  • symlink: Symbolically link packages from the wheel into the site-packages directory
  • +
    --managed-python

    Require use of uv-managed Python versions.

    + +

    By default, uv prefers using Python versions it manages. However, it will use system Python versions if a uv-managed Python is not installed. This option disables use of system Python versions.

    + +

    May also be set with the UV_MANAGED_PYTHON environment variable.

    --native-tls

    Whether to load TLS certificates from the platform’s native certificate store.

    By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).

    @@ -2119,6 +2094,11 @@ uv lock [OPTIONS]

    May also be set with the UV_NO_CONFIG environment variable.

    --no-index

    Ignore the registry index (e.g., PyPI), instead relying on direct URL dependencies and those provided via --find-links

    +
    --no-managed-python

    Disable use of uv-managed Python versions.

    + +

    Instead, uv will search for a suitable Python version on the system.

    + +

    May also be set with the UV_NO_MANAGED_PYTHON environment variable.

    --no-progress

    Hide all progress outputs.

    For example, spinners or progress bars.

    @@ -2170,22 +2150,6 @@ uv lock [OPTIONS]

    See uv python for details on Python discovery and supported request formats.

    May also be set with the UV_PYTHON environment variable.

    -
    --python-preference python-preference

    Whether to prefer uv-managed or system Python installations.

    - -

    By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.

    - -

    May also be set with the UV_PYTHON_PREFERENCE environment variable.

    -

    Possible values:

    - -
      -
    • only-managed: Only use managed Python installations; never use system Python installations
    • - -
    • managed: Prefer managed Python installations over system Python installations
    • - -
    • system: Prefer system Python installations over managed Python installations
    • - -
    • only-system: Only use system Python installations; never use managed Python installations
    • -
    --quiet, -q

    Do not print any output

    --refresh

    Refresh all cached data

    @@ -2426,6 +2390,11 @@ uv export [OPTIONS]

    Requires that the lockfile is up-to-date. If the lockfile is missing or needs to be updated, uv will exit with an error.

    May also be set with the UV_LOCKED environment variable.

    +
    --managed-python

    Require use of uv-managed Python versions.

    + +

    By default, uv prefers using Python versions it manages. However, it will use system Python versions if a uv-managed Python is not installed. This option disables use of system Python versions.

    + +

    May also be set with the UV_MANAGED_PYTHON environment variable.

    --native-tls

    Whether to load TLS certificates from the platform’s native certificate store.

    By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).

    @@ -2504,6 +2473,11 @@ uv export [OPTIONS]
    --no-index

    Ignore the registry index (e.g., PyPI), instead relying on direct URL dependencies and those provided via --find-links

    +
    --no-managed-python

    Disable use of uv-managed Python versions.

    + +

    Instead, uv will search for a suitable Python version on the system.

    + +

    May also be set with the UV_NO_MANAGED_PYTHON environment variable.

    --no-progress

    Hide all progress outputs.

    For example, spinners or progress bars.

    @@ -2577,22 +2551,6 @@ uv export [OPTIONS]

    See uv python for details on Python discovery and supported request formats.

    May also be set with the UV_PYTHON environment variable.

    -
    --python-preference python-preference

    Whether to prefer uv-managed or system Python installations.

    - -

    By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.

    - -

    May also be set with the UV_PYTHON_PREFERENCE environment variable.

    -

    Possible values:

    - -
      -
    • only-managed: Only use managed Python installations; never use system Python installations
    • - -
    • managed: Prefer managed Python installations over system Python installations
    • - -
    • system: Prefer system Python installations over managed Python installations
    • - -
    • only-system: Only use system Python installations; never use managed Python installations
    • -
    --quiet, -q

    Do not print any output

    --refresh

    Refresh all cached data

    @@ -2808,6 +2766,11 @@ uv tree [OPTIONS]

    Requires that the lockfile is up-to-date. If the lockfile is missing or needs to be updated, uv will exit with an error.

    May also be set with the UV_LOCKED environment variable.

    +
    --managed-python

    Require use of uv-managed Python versions.

    + +

    By default, uv prefers using Python versions it manages. However, it will use system Python versions if a uv-managed Python is not installed. This option disables use of system Python versions.

    + +

    May also be set with the UV_MANAGED_PYTHON environment variable.

    --native-tls

    Whether to load TLS certificates from the platform’s native certificate store.

    By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).

    @@ -2866,6 +2829,11 @@ uv tree [OPTIONS]
    --no-index

    Ignore the registry index (e.g., PyPI), instead relying on direct URL dependencies and those provided via --find-links

    +
    --no-managed-python

    Disable use of uv-managed Python versions.

    + +

    Instead, uv will search for a suitable Python version on the system.

    + +

    May also be set with the UV_NO_MANAGED_PYTHON environment variable.

    --no-progress

    Hide all progress outputs.

    For example, spinners or progress bars.

    @@ -3016,22 +2984,6 @@ uv tree [OPTIONS]
  • aarch64-manylinux_2_40: An ARM64 target for the manylinux_2_40 platform
  • -
    --python-preference python-preference

    Whether to prefer uv-managed or system Python installations.

    - -

    By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.

    - -

    May also be set with the UV_PYTHON_PREFERENCE environment variable.

    -

    Possible values:

    - -
      -
    • only-managed: Only use managed Python installations; never use system Python installations
    • - -
    • managed: Prefer managed Python installations over system Python installations
    • - -
    • system: Prefer system Python installations over managed Python installations
    • - -
    • only-system: Only use system Python installations; never use managed Python installations
    • -
    --python-version python-version

    The Python version to use when filtering the tree.

    For example, pass --python-version 3.10 to display the dependencies that would be included when installing on Python 3.10.

    @@ -3292,6 +3244,11 @@ uv tool run [OPTIONS] [COMMAND]
  • symlink: Symbolically link packages from the wheel into the site-packages directory
  • +
    --managed-python

    Require use of uv-managed Python versions.

    + +

    By default, uv prefers using Python versions it manages. However, it will use system Python versions if a uv-managed Python is not installed. This option disables use of system Python versions.

    + +

    May also be set with the UV_MANAGED_PYTHON environment variable.

    --native-tls

    Whether to load TLS certificates from the platform’s native certificate store.

    By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).

    @@ -3334,6 +3291,11 @@ uv tool run [OPTIONS] [COMMAND]

    May also be set with the UV_NO_CONFIG environment variable.

    --no-index

    Ignore the registry index (e.g., PyPI), instead relying on direct URL dependencies and those provided via --find-links

    +
    --no-managed-python

    Disable use of uv-managed Python versions.

    + +

    Instead, uv will search for a suitable Python version on the system.

    + +

    May also be set with the UV_NO_MANAGED_PYTHON environment variable.

    --no-progress

    Hide all progress outputs.

    For example, spinners or progress bars.

    @@ -3388,22 +3350,6 @@ uv tool run [OPTIONS] [COMMAND]

    See uv python for details on Python discovery and supported request formats.

    May also be set with the UV_PYTHON environment variable.

    -
    --python-preference python-preference

    Whether to prefer uv-managed or system Python installations.

    - -

    By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.

    - -

    May also be set with the UV_PYTHON_PREFERENCE environment variable.

    -

    Possible values:

    - -
      -
    • only-managed: Only use managed Python installations; never use system Python installations
    • - -
    • managed: Prefer managed Python installations over system Python installations
    • - -
    • system: Prefer system Python installations over managed Python installations
    • - -
    • only-system: Only use system Python installations; never use managed Python installations
    • -
    --quiet, -q

    Do not print any output

    --refresh

    Refresh all cached data

    @@ -3632,6 +3578,11 @@ uv tool install [OPTIONS]
  • symlink: Symbolically link packages from the wheel into the site-packages directory
  • +
    --managed-python

    Require use of uv-managed Python versions.

    + +

    By default, uv prefers using Python versions it manages. However, it will use system Python versions if a uv-managed Python is not installed. This option disables use of system Python versions.

    + +

    May also be set with the UV_MANAGED_PYTHON environment variable.

    --native-tls

    Whether to load TLS certificates from the platform’s native certificate store.

    By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).

    @@ -3674,6 +3625,11 @@ uv tool install [OPTIONS]

    May also be set with the UV_NO_CONFIG environment variable.

    --no-index

    Ignore the registry index (e.g., PyPI), instead relying on direct URL dependencies and those provided via --find-links

    +
    --no-managed-python

    Disable use of uv-managed Python versions.

    + +

    Instead, uv will search for a suitable Python version on the system.

    + +

    May also be set with the UV_NO_MANAGED_PYTHON environment variable.

    --no-progress

    Hide all progress outputs.

    For example, spinners or progress bars.

    @@ -3728,22 +3684,6 @@ uv tool install [OPTIONS]

    See uv python for details on Python discovery and supported request formats.

    May also be set with the UV_PYTHON environment variable.

    -
    --python-preference python-preference

    Whether to prefer uv-managed or system Python installations.

    - -

    By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.

    - -

    May also be set with the UV_PYTHON_PREFERENCE environment variable.

    -

    Possible values:

    - -
      -
    • only-managed: Only use managed Python installations; never use system Python installations
    • - -
    • managed: Prefer managed Python installations over system Python installations
    • - -
    • system: Prefer system Python installations over managed Python installations
    • - -
    • only-system: Only use system Python installations; never use managed Python installations
    • -
    --quiet, -q

    Do not print any output

    --refresh

    Refresh all cached data

    @@ -3959,6 +3899,11 @@ uv tool upgrade [OPTIONS] ...
  • symlink: Symbolically link packages from the wheel into the site-packages directory
  • +
    --managed-python

    Require use of uv-managed Python versions.

    + +

    By default, uv prefers using Python versions it manages. However, it will use system Python versions if a uv-managed Python is not installed. This option disables use of system Python versions.

    + +

    May also be set with the UV_MANAGED_PYTHON environment variable.

    --native-tls

    Whether to load TLS certificates from the platform’s native certificate store.

    By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).

    @@ -4001,6 +3946,11 @@ uv tool upgrade [OPTIONS] ...

    May also be set with the UV_NO_CONFIG environment variable.

    --no-index

    Ignore the registry index (e.g., PyPI), instead relying on direct URL dependencies and those provided via --find-links

    +
    --no-managed-python

    Disable use of uv-managed Python versions.

    + +

    Instead, uv will search for a suitable Python version on the system.

    + +

    May also be set with the UV_NO_MANAGED_PYTHON environment variable.

    --no-progress

    Hide all progress outputs.

    For example, spinners or progress bars.

    @@ -4048,22 +3998,6 @@ uv tool upgrade [OPTIONS] ...

    See uv python for details on Python discovery and supported request formats.

    May also be set with the UV_PYTHON environment variable.

    -
    --python-preference python-preference

    Whether to prefer uv-managed or system Python installations.

    - -

    By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.

    - -

    May also be set with the UV_PYTHON_PREFERENCE environment variable.

    -

    Possible values:

    - -
      -
    • only-managed: Only use managed Python installations; never use system Python installations
    • - -
    • managed: Prefer managed Python installations over system Python installations
    • - -
    • system: Prefer system Python installations over managed Python installations
    • - -
    • only-system: Only use system Python installations; never use managed Python installations
    • -
    --quiet, -q

    Do not print any output

    --reinstall

    Reinstall all packages, regardless of whether they’re already installed. Implies --refresh

    @@ -4146,6 +4080,11 @@ uv tool list [OPTIONS]
    --help, -h

    Display the concise help for this command

    +
    --managed-python

    Require use of uv-managed Python versions.

    + +

    By default, uv prefers using Python versions it manages. However, it will use system Python versions if a uv-managed Python is not installed. This option disables use of system Python versions.

    + +

    May also be set with the UV_MANAGED_PYTHON environment variable.

    --native-tls

    Whether to load TLS certificates from the platform’s native certificate store.

    By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).

    @@ -4161,6 +4100,11 @@ uv tool list [OPTIONS]

    Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.

    May also be set with the UV_NO_CONFIG environment variable.

    +
    --no-managed-python

    Disable use of uv-managed Python versions.

    + +

    Instead, uv will search for a suitable Python version on the system.

    + +

    May also be set with the UV_NO_MANAGED_PYTHON environment variable.

    --no-progress

    Hide all progress outputs.

    For example, spinners or progress bars.

    @@ -4257,6 +4201,11 @@ uv tool uninstall [OPTIONS] ...
    --help, -h

    Display the concise help for this command

    +
    --managed-python

    Require use of uv-managed Python versions.

    + +

    By default, uv prefers using Python versions it manages. However, it will use system Python versions if a uv-managed Python is not installed. This option disables use of system Python versions.

    + +

    May also be set with the UV_MANAGED_PYTHON environment variable.

    --native-tls

    Whether to load TLS certificates from the platform’s native certificate store.

    By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).

    @@ -4272,6 +4221,11 @@ uv tool uninstall [OPTIONS] ...

    Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.

    May also be set with the UV_NO_CONFIG environment variable.

    +
    --no-managed-python

    Disable use of uv-managed Python versions.

    + +

    Instead, uv will search for a suitable Python version on the system.

    + +

    May also be set with the UV_NO_MANAGED_PYTHON environment variable.

    --no-progress

    Hide all progress outputs.

    For example, spinners or progress bars.

    @@ -4294,22 +4248,6 @@ uv tool uninstall [OPTIONS] ...

    This setting has no effect when used in the uv pip interface.

    -
    --python-preference python-preference

    Whether to prefer uv-managed or system Python installations.

    - -

    By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.

    - -

    May also be set with the UV_PYTHON_PREFERENCE environment variable.

    -

    Possible values:

    - -
      -
    • only-managed: Only use managed Python installations; never use system Python installations
    • - -
    • managed: Prefer managed Python installations over system Python installations
    • - -
    • system: Prefer system Python installations over managed Python installations
    • - -
    • only-system: Only use system Python installations; never use managed Python installations
    • -
    --quiet, -q

    Do not print any output

    --verbose, -v

    Use verbose output.

    @@ -4380,6 +4318,11 @@ uv tool update-shell [OPTIONS]
    --help, -h

    Display the concise help for this command

    +
    --managed-python

    Require use of uv-managed Python versions.

    + +

    By default, uv prefers using Python versions it manages. However, it will use system Python versions if a uv-managed Python is not installed. This option disables use of system Python versions.

    + +

    May also be set with the UV_MANAGED_PYTHON environment variable.

    --native-tls

    Whether to load TLS certificates from the platform’s native certificate store.

    By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).

    @@ -4395,6 +4338,11 @@ uv tool update-shell [OPTIONS]

    Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.

    May also be set with the UV_NO_CONFIG environment variable.

    +
    --no-managed-python

    Disable use of uv-managed Python versions.

    + +

    Instead, uv will search for a suitable Python version on the system.

    + +

    May also be set with the UV_NO_MANAGED_PYTHON environment variable.

    --no-progress

    Hide all progress outputs.

    For example, spinners or progress bars.

    @@ -4417,22 +4365,6 @@ uv tool update-shell [OPTIONS]

    This setting has no effect when used in the uv pip interface.

    -
    --python-preference python-preference

    Whether to prefer uv-managed or system Python installations.

    - -

    By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.

    - -

    May also be set with the UV_PYTHON_PREFERENCE environment variable.

    -

    Possible values:

    - -
      -
    • only-managed: Only use managed Python installations; never use system Python installations
    • - -
    • managed: Prefer managed Python installations over system Python installations
    • - -
    • system: Prefer system Python installations over managed Python installations
    • - -
    • only-system: Only use system Python installations; never use managed Python installations
    • -
    --quiet, -q

    Do not print any output

    --verbose, -v

    Use verbose output.

    @@ -4521,6 +4453,11 @@ uv tool dir [OPTIONS]
    --help, -h

    Display the concise help for this command

    +
    --managed-python

    Require use of uv-managed Python versions.

    + +

    By default, uv prefers using Python versions it manages. However, it will use system Python versions if a uv-managed Python is not installed. This option disables use of system Python versions.

    + +

    May also be set with the UV_MANAGED_PYTHON environment variable.

    --native-tls

    Whether to load TLS certificates from the platform’s native certificate store.

    By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).

    @@ -4536,6 +4473,11 @@ uv tool dir [OPTIONS]

    Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.

    May also be set with the UV_NO_CONFIG environment variable.

    +
    --no-managed-python

    Disable use of uv-managed Python versions.

    + +

    Instead, uv will search for a suitable Python version on the system.

    + +

    May also be set with the UV_NO_MANAGED_PYTHON environment variable.

    --no-progress

    Hide all progress outputs.

    For example, spinners or progress bars.

    @@ -4558,22 +4500,6 @@ uv tool dir [OPTIONS]

    This setting has no effect when used in the uv pip interface.

    -
    --python-preference python-preference

    Whether to prefer uv-managed or system Python installations.

    - -

    By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.

    - -

    May also be set with the UV_PYTHON_PREFERENCE environment variable.

    -

    Possible values:

    - -
      -
    • only-managed: Only use managed Python installations; never use system Python installations
    • - -
    • managed: Prefer managed Python installations over system Python installations
    • - -
    • system: Prefer system Python installations over managed Python installations
    • - -
    • only-system: Only use system Python installations; never use managed Python installations
    • -
    --quiet, -q

    Do not print any output

    --verbose, -v

    Use verbose output.

    @@ -4654,7 +4580,9 @@ List the available Python installations. By default, installed Python versions and the downloads for latest available patch version of each supported Python major version are shown. -The displayed versions are filtered by the `--python-preference` option, i.e., if using `only-system`, no managed Python versions will be shown. +Use `--managed-python` to view only managed Python versions. + +Use `--no-managed-python` to omit managed Python versions. Use `--all-versions` to view all available patch versions. @@ -4722,6 +4650,11 @@ uv python list [OPTIONS]
    --help, -h

    Display the concise help for this command

    +
    --managed-python

    Require use of uv-managed Python versions.

    + +

    By default, uv prefers using Python versions it manages. However, it will use system Python versions if a uv-managed Python is not installed. This option disables use of system Python versions.

    + +

    May also be set with the UV_MANAGED_PYTHON environment variable.

    --native-tls

    Whether to load TLS certificates from the platform’s native certificate store.

    By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).

    @@ -4737,6 +4670,11 @@ uv python list [OPTIONS]

    Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.

    May also be set with the UV_NO_CONFIG environment variable.

    +
    --no-managed-python

    Disable use of uv-managed Python versions.

    + +

    Instead, uv will search for a suitable Python version on the system.

    + +

    May also be set with the UV_NO_MANAGED_PYTHON environment variable.

    --no-progress

    Hide all progress outputs.

    For example, spinners or progress bars.

    @@ -4777,22 +4715,6 @@ uv python list [OPTIONS]

    This setting has no effect when used in the uv pip interface.

    -
    --python-preference python-preference

    Whether to prefer uv-managed or system Python installations.

    - -

    By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.

    - -

    May also be set with the UV_PYTHON_PREFERENCE environment variable.

    -

    Possible values:

    - -
      -
    • only-managed: Only use managed Python installations; never use system Python installations
    • - -
    • managed: Prefer managed Python installations over system Python installations
    • - -
    • system: Prefer system Python installations over managed Python installations
    • - -
    • only-system: Only use system Python installations; never use managed Python installations
    • -
    --quiet, -q

    Do not print any output

    --show-urls

    Show the URLs of available Python downloads.

    @@ -4902,6 +4824,11 @@ uv python install [OPTIONS] [TARGETS]...

    See uv python dir to view the current Python installation directory. Defaults to ~/.local/share/uv/python.

    May also be set with the UV_PYTHON_INSTALL_DIR environment variable.

    +
    --managed-python

    Require use of uv-managed Python versions.

    + +

    By default, uv prefers using Python versions it manages. However, it will use system Python versions if a uv-managed Python is not installed. This option disables use of system Python versions.

    + +

    May also be set with the UV_MANAGED_PYTHON environment variable.

    --mirror mirror

    Set the URL to use as the source for downloading Python installations.

    The provided URL will replace https://github.com/astral-sh/python-build-standalone/releases/download in, e.g., https://github.com/astral-sh/python-build-standalone/releases/download/20240713/cpython-3.12.4%2B20240713-aarch64-apple-darwin-install_only.tar.gz.

    @@ -4924,6 +4851,11 @@ uv python install [OPTIONS] [TARGETS]...

    Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.

    May also be set with the UV_NO_CONFIG environment variable.

    +
    --no-managed-python

    Disable use of uv-managed Python versions.

    + +

    Instead, uv will search for a suitable Python version on the system.

    + +

    May also be set with the UV_NO_MANAGED_PYTHON environment variable.

    --no-progress

    Hide all progress outputs.

    For example, spinners or progress bars.

    @@ -4953,22 +4885,6 @@ uv python install [OPTIONS] [TARGETS]...

    Distributions can be read from a local directory by using the file:// URL scheme.

    May also be set with the UV_PYPY_INSTALL_MIRROR environment variable.

    -
    --python-preference python-preference

    Whether to prefer uv-managed or system Python installations.

    - -

    By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.

    - -

    May also be set with the UV_PYTHON_PREFERENCE environment variable.

    -

    Possible values:

    - -
      -
    • only-managed: Only use managed Python installations; never use system Python installations
    • - -
    • managed: Prefer managed Python installations over system Python installations
    • - -
    • system: Prefer system Python installations over managed Python installations
    • - -
    • only-system: Only use system Python installations; never use managed Python installations
    • -
    --quiet, -q

    Do not print any output

    --reinstall, -r

    Reinstall the requested Python version, if it’s already installed.

    @@ -5049,6 +4965,11 @@ uv python find [OPTIONS] [REQUEST]
    --help, -h

    Display the concise help for this command

    +
    --managed-python

    Require use of uv-managed Python versions.

    + +

    By default, uv prefers using Python versions it manages. However, it will use system Python versions if a uv-managed Python is not installed. This option disables use of system Python versions.

    + +

    May also be set with the UV_MANAGED_PYTHON environment variable.

    --native-tls

    Whether to load TLS certificates from the platform’s native certificate store.

    By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).

    @@ -5064,6 +4985,11 @@ uv python find [OPTIONS] [REQUEST]

    Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.

    May also be set with the UV_NO_CONFIG environment variable.

    +
    --no-managed-python

    Disable use of uv-managed Python versions.

    + +

    Instead, uv will search for a suitable Python version on the system.

    + +

    May also be set with the UV_NO_MANAGED_PYTHON environment variable.

    --no-progress

    Hide all progress outputs.

    For example, spinners or progress bars.

    @@ -5090,22 +5016,6 @@ uv python find [OPTIONS] [REQUEST]

    This setting has no effect when used in the uv pip interface.

    -
    --python-preference python-preference

    Whether to prefer uv-managed or system Python installations.

    - -

    By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.

    - -

    May also be set with the UV_PYTHON_PREFERENCE environment variable.

    -

    Possible values:

    - -
      -
    • only-managed: Only use managed Python installations; never use system Python installations
    • - -
    • managed: Prefer managed Python installations over system Python installations
    • - -
    • system: Prefer system Python installations over managed Python installations
    • - -
    • only-system: Only use system Python installations; never use managed Python installations
    • -
    --quiet, -q

    Do not print any output

    --system

    Only find system Python interpreters.

    @@ -5203,6 +5113,11 @@ uv python pin [OPTIONS] [REQUEST]
    --help, -h

    Display the concise help for this command

    +
    --managed-python

    Require use of uv-managed Python versions.

    + +

    By default, uv prefers using Python versions it manages. However, it will use system Python versions if a uv-managed Python is not installed. This option disables use of system Python versions.

    + +

    May also be set with the UV_MANAGED_PYTHON environment variable.

    --native-tls

    Whether to load TLS certificates from the platform’s native certificate store.

    By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).

    @@ -5218,6 +5133,11 @@ uv python pin [OPTIONS] [REQUEST]

    Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.

    May also be set with the UV_NO_CONFIG environment variable.

    +
    --no-managed-python

    Disable use of uv-managed Python versions.

    + +

    Instead, uv will search for a suitable Python version on the system.

    + +

    May also be set with the UV_NO_MANAGED_PYTHON environment variable.

    --no-progress

    Hide all progress outputs.

    For example, spinners or progress bars.

    @@ -5244,22 +5164,6 @@ uv python pin [OPTIONS] [REQUEST]

    This setting has no effect when used in the uv pip interface.

    -
    --python-preference python-preference

    Whether to prefer uv-managed or system Python installations.

    - -

    By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.

    - -

    May also be set with the UV_PYTHON_PREFERENCE environment variable.

    -

    Possible values:

    - -
      -
    • only-managed: Only use managed Python installations; never use system Python installations
    • - -
    • managed: Prefer managed Python installations over system Python installations
    • - -
    • system: Prefer system Python installations over managed Python installations
    • - -
    • only-system: Only use system Python installations; never use managed Python installations
    • -
    --quiet, -q

    Do not print any output

    --resolved

    Write the resolved Python interpreter path instead of the request.

    @@ -5352,6 +5256,11 @@ uv python dir [OPTIONS]
    --help, -h

    Display the concise help for this command

    +
    --managed-python

    Require use of uv-managed Python versions.

    + +

    By default, uv prefers using Python versions it manages. However, it will use system Python versions if a uv-managed Python is not installed. This option disables use of system Python versions.

    + +

    May also be set with the UV_MANAGED_PYTHON environment variable.

    --native-tls

    Whether to load TLS certificates from the platform’s native certificate store.

    By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).

    @@ -5367,6 +5276,11 @@ uv python dir [OPTIONS]

    Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.

    May also be set with the UV_NO_CONFIG environment variable.

    +
    --no-managed-python

    Disable use of uv-managed Python versions.

    + +

    Instead, uv will search for a suitable Python version on the system.

    + +

    May also be set with the UV_NO_MANAGED_PYTHON environment variable.

    --no-progress

    Hide all progress outputs.

    For example, spinners or progress bars.

    @@ -5389,22 +5303,6 @@ uv python dir [OPTIONS]

    This setting has no effect when used in the uv pip interface.

    -
    --python-preference python-preference

    Whether to prefer uv-managed or system Python installations.

    - -

    By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.

    - -

    May also be set with the UV_PYTHON_PREFERENCE environment variable.

    -

    Possible values:

    - -
      -
    • only-managed: Only use managed Python installations; never use system Python installations
    • - -
    • managed: Prefer managed Python installations over system Python installations
    • - -
    • system: Prefer system Python installations over managed Python installations
    • - -
    • only-system: Only use system Python installations; never use managed Python installations
    • -
    --quiet, -q

    Do not print any output

    --verbose, -v

    Use verbose output.

    @@ -5482,6 +5380,11 @@ uv python uninstall [OPTIONS] ...
    --install-dir, -i install-dir

    The directory where the Python was installed

    May also be set with the UV_PYTHON_INSTALL_DIR environment variable.

    +
    --managed-python

    Require use of uv-managed Python versions.

    + +

    By default, uv prefers using Python versions it manages. However, it will use system Python versions if a uv-managed Python is not installed. This option disables use of system Python versions.

    + +

    May also be set with the UV_MANAGED_PYTHON environment variable.

    --native-tls

    Whether to load TLS certificates from the platform’s native certificate store.

    By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).

    @@ -5497,6 +5400,11 @@ uv python uninstall [OPTIONS] ...

    Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.

    May also be set with the UV_NO_CONFIG environment variable.

    +
    --no-managed-python

    Disable use of uv-managed Python versions.

    + +

    Instead, uv will search for a suitable Python version on the system.

    + +

    May also be set with the UV_NO_MANAGED_PYTHON environment variable.

    --no-progress

    Hide all progress outputs.

    For example, spinners or progress bars.

    @@ -5519,22 +5427,6 @@ uv python uninstall [OPTIONS] ...

    This setting has no effect when used in the uv pip interface.

    -
    --python-preference python-preference

    Whether to prefer uv-managed or system Python installations.

    - -

    By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.

    - -

    May also be set with the UV_PYTHON_PREFERENCE environment variable.

    -

    Possible values:

    - -
      -
    • only-managed: Only use managed Python installations; never use system Python installations
    • - -
    • managed: Prefer managed Python installations over system Python installations
    • - -
    • system: Prefer system Python installations over managed Python installations
    • - -
    • only-system: Only use system Python installations; never use managed Python installations
    • -
    --quiet, -q

    Do not print any output

    --verbose, -v

    Use verbose output.

    @@ -5797,6 +5689,11 @@ uv pip compile [OPTIONS] >
  • symlink: Symbolically link packages from the wheel into the site-packages directory
  • +
    --managed-python

    Require use of uv-managed Python versions.

    + +

    By default, uv prefers using Python versions it manages. However, it will use system Python versions if a uv-managed Python is not installed. This option disables use of system Python versions.

    + +

    May also be set with the UV_MANAGED_PYTHON environment variable.

    --native-tls

    Whether to load TLS certificates from the platform’s native certificate store.

    By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).

    @@ -5838,6 +5735,11 @@ uv pip compile [OPTIONS] >
    --no-index

    Ignore the registry index (e.g., PyPI), instead relying on direct URL dependencies and those provided via --find-links

    +
    --no-managed-python

    Disable use of uv-managed Python versions.

    + +

    Instead, uv will search for a suitable Python version on the system.

    + +

    May also be set with the UV_NO_MANAGED_PYTHON environment variable.

    --no-progress

    Hide all progress outputs.

    For example, spinners or progress bars.

    @@ -5998,22 +5900,6 @@ uv pip compile [OPTIONS] >
  • aarch64-manylinux_2_40: An ARM64 target for the manylinux_2_40 platform
  • -
    --python-preference python-preference

    Whether to prefer uv-managed or system Python installations.

    - -

    By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.

    - -

    May also be set with the UV_PYTHON_PREFERENCE environment variable.

    -

    Possible values:

    - -
      -
    • only-managed: Only use managed Python installations; never use system Python installations
    • - -
    • managed: Prefer managed Python installations over system Python installations
    • - -
    • system: Prefer system Python installations over managed Python installations
    • - -
    • only-system: Only use system Python installations; never use managed Python installations
    • -
    --python-version python-version

    The Python version to use for resolution.

    For example, 3.8 or 3.8.17.

    @@ -6245,6 +6131,11 @@ uv pip sync [OPTIONS] ...
  • symlink: Symbolically link packages from the wheel into the site-packages directory
  • +
    --managed-python

    Require use of uv-managed Python versions.

    + +

    By default, uv prefers using Python versions it manages. However, it will use system Python versions if a uv-managed Python is not installed. This option disables use of system Python versions.

    + +

    May also be set with the UV_MANAGED_PYTHON environment variable.

    --native-tls

    Whether to load TLS certificates from the platform’s native certificate store.

    By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).

    @@ -6274,6 +6165,11 @@ uv pip sync [OPTIONS] ...

    May also be set with the UV_NO_CACHE environment variable.

    --no-index

    Ignore the registry index (e.g., PyPI), instead relying on direct URL dependencies and those provided via --find-links

    +
    --no-managed-python

    Disable use of uv-managed Python versions.

    + +

    Instead, uv will search for a suitable Python version on the system.

    + +

    May also be set with the UV_NO_MANAGED_PYTHON environment variable.

    --no-progress

    Hide all progress outputs.

    For example, spinners or progress bars.

    @@ -6405,22 +6301,6 @@ uv pip sync [OPTIONS] ...
  • aarch64-manylinux_2_40: An ARM64 target for the manylinux_2_40 platform
  • -
    --python-preference python-preference

    Whether to prefer uv-managed or system Python installations.

    - -

    By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.

    - -

    May also be set with the UV_PYTHON_PREFERENCE environment variable.

    -

    Possible values:

    - -
      -
    • only-managed: Only use managed Python installations; never use system Python installations
    • - -
    • managed: Prefer managed Python installations over system Python installations
    • - -
    • system: Prefer system Python installations over managed Python installations
    • - -
    • only-system: Only use system Python installations; never use managed Python installations
    • -
    --python-version python-version

    The minimum Python version that should be supported by the requirements (e.g., 3.7 or 3.7.9).

    If a patch version is omitted, the minimum patch version is assumed. For example, 3.7 is mapped to 3.7.0.

    @@ -6675,6 +6555,11 @@ uv pip install [OPTIONS] |--editable symlink: Symbolically link packages from the wheel into the site-packages directory +
    --managed-python

    Require use of uv-managed Python versions.

    + +

    By default, uv prefers using Python versions it manages. However, it will use system Python versions if a uv-managed Python is not installed. This option disables use of system Python versions.

    + +

    May also be set with the UV_MANAGED_PYTHON environment variable.

    --native-tls

    Whether to load TLS certificates from the platform’s native certificate store.

    By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).

    @@ -6715,6 +6600,11 @@ uv pip install [OPTIONS] |--editable
    --no-index

    Ignore the registry index (e.g., PyPI), instead relying on direct URL dependencies and those provided via --find-links

    +
    --no-managed-python

    Disable use of uv-managed Python versions.

    + +

    Instead, uv will search for a suitable Python version on the system.

    + +

    May also be set with the UV_NO_MANAGED_PYTHON environment variable.

    --no-progress

    Hide all progress outputs.

    For example, spinners or progress bars.

    @@ -6871,22 +6761,6 @@ uv pip install [OPTIONS] |--editable aarch64-manylinux_2_40: An ARM64 target for the manylinux_2_40 platform -
    --python-preference python-preference

    Whether to prefer uv-managed or system Python installations.

    - -

    By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.

    - -

    May also be set with the UV_PYTHON_PREFERENCE environment variable.

    -

    Possible values:

    - -
      -
    • only-managed: Only use managed Python installations; never use system Python installations
    • - -
    • managed: Prefer managed Python installations over system Python installations
    • - -
    • system: Prefer system Python installations over managed Python installations
    • - -
    • only-system: Only use system Python installations; never use managed Python installations
    • -
    --python-version python-version

    The minimum Python version that should be supported by the requirements (e.g., 3.7 or 3.7.9).

    If a patch version is omitted, the minimum patch version is assumed. For example, 3.7 is mapped to 3.7.0.

    @@ -7038,6 +6912,11 @@ uv pip uninstall [OPTIONS] >
  • subprocess: Use the keyring command for credential lookup
  • +
    --managed-python

    Require use of uv-managed Python versions.

    + +

    By default, uv prefers using Python versions it manages. However, it will use system Python versions if a uv-managed Python is not installed. This option disables use of system Python versions.

    + +

    May also be set with the UV_MANAGED_PYTHON environment variable.

    --native-tls

    Whether to load TLS certificates from the platform’s native certificate store.

    By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).

    @@ -7053,6 +6932,11 @@ uv pip uninstall [OPTIONS] >

    Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.

    May also be set with the UV_NO_CONFIG environment variable.

    +
    --no-managed-python

    Disable use of uv-managed Python versions.

    + +

    Instead, uv will search for a suitable Python version on the system.

    + +

    May also be set with the UV_NO_MANAGED_PYTHON environment variable.

    --no-progress

    Hide all progress outputs.

    For example, spinners or progress bars.

    @@ -7084,22 +6968,6 @@ uv pip uninstall [OPTIONS] >

    See uv python for details on Python discovery and supported request formats.

    May also be set with the UV_PYTHON environment variable.

    -
    --python-preference python-preference

    Whether to prefer uv-managed or system Python installations.

    - -

    By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.

    - -

    May also be set with the UV_PYTHON_PREFERENCE environment variable.

    -

    Possible values:

    - -
      -
    • only-managed: Only use managed Python installations; never use system Python installations
    • - -
    • managed: Prefer managed Python installations over system Python installations
    • - -
    • system: Prefer system Python installations over managed Python installations
    • - -
    • only-system: Only use system Python installations; never use managed Python installations
    • -
    --quiet, -q

    Do not print any output

    --requirements, -r requirements

    Uninstall all packages listed in the given requirements files

    @@ -7177,6 +7045,11 @@ uv pip freeze [OPTIONS]
    --help, -h

    Display the concise help for this command

    +
    --managed-python

    Require use of uv-managed Python versions.

    + +

    By default, uv prefers using Python versions it manages. However, it will use system Python versions if a uv-managed Python is not installed. This option disables use of system Python versions.

    + +

    May also be set with the UV_MANAGED_PYTHON environment variable.

    --native-tls

    Whether to load TLS certificates from the platform’s native certificate store.

    By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).

    @@ -7192,6 +7065,11 @@ uv pip freeze [OPTIONS]

    Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.

    May also be set with the UV_NO_CONFIG environment variable.

    +
    --no-managed-python

    Disable use of uv-managed Python versions.

    + +

    Instead, uv will search for a suitable Python version on the system.

    + +

    May also be set with the UV_NO_MANAGED_PYTHON environment variable.

    --no-progress

    Hide all progress outputs.

    For example, spinners or progress bars.

    @@ -7223,22 +7101,6 @@ uv pip freeze [OPTIONS]

    See uv python for details on Python discovery and supported request formats.

    May also be set with the UV_PYTHON environment variable.

    -
    --python-preference python-preference

    Whether to prefer uv-managed or system Python installations.

    - -

    By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.

    - -

    May also be set with the UV_PYTHON_PREFERENCE environment variable.

    -

    Possible values:

    - -
      -
    • only-managed: Only use managed Python installations; never use system Python installations
    • - -
    • managed: Prefer managed Python installations over system Python installations
    • - -
    • system: Prefer system Python installations over managed Python installations
    • - -
    • only-system: Only use system Python installations; never use managed Python installations
    • -
    --quiet, -q

    Do not print any output

    --strict

    Validate the Python environment, to detect packages with missing dependencies and other issues

    @@ -7398,6 +7260,11 @@ uv pip list [OPTIONS]
  • subprocess: Use the keyring command for credential lookup
  • +
    --managed-python

    Require use of uv-managed Python versions.

    + +

    By default, uv prefers using Python versions it manages. However, it will use system Python versions if a uv-managed Python is not installed. This option disables use of system Python versions.

    + +

    May also be set with the UV_MANAGED_PYTHON environment variable.

    --native-tls

    Whether to load TLS certificates from the platform’s native certificate store.

    By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).

    @@ -7415,6 +7282,11 @@ uv pip list [OPTIONS]

    May also be set with the UV_NO_CONFIG environment variable.

    --no-index

    Ignore the registry index (e.g., PyPI), instead relying on direct URL dependencies and those provided via --find-links

    +
    --no-managed-python

    Disable use of uv-managed Python versions.

    + +

    Instead, uv will search for a suitable Python version on the system.

    + +

    May also be set with the UV_NO_MANAGED_PYTHON environment variable.

    --no-progress

    Hide all progress outputs.

    For example, spinners or progress bars.

    @@ -7448,22 +7320,6 @@ uv pip list [OPTIONS]

    See uv python for details on Python discovery and supported request formats.

    May also be set with the UV_PYTHON environment variable.

    -
    --python-preference python-preference

    Whether to prefer uv-managed or system Python installations.

    - -

    By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.

    - -

    May also be set with the UV_PYTHON_PREFERENCE environment variable.

    -

    Possible values:

    - -
      -
    • only-managed: Only use managed Python installations; never use system Python installations
    • - -
    • managed: Prefer managed Python installations over system Python installations
    • - -
    • system: Prefer system Python installations over managed Python installations
    • - -
    • only-system: Only use system Python installations; never use managed Python installations
    • -
    --quiet, -q

    Do not print any output

    --strict

    Validate the Python environment, to detect packages with missing dependencies and other issues

    @@ -7545,6 +7401,11 @@ uv pip show [OPTIONS] [PACKAGE]...
    --help, -h

    Display the concise help for this command

    +
    --managed-python

    Require use of uv-managed Python versions.

    + +

    By default, uv prefers using Python versions it manages. However, it will use system Python versions if a uv-managed Python is not installed. This option disables use of system Python versions.

    + +

    May also be set with the UV_MANAGED_PYTHON environment variable.

    --native-tls

    Whether to load TLS certificates from the platform’s native certificate store.

    By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).

    @@ -7560,6 +7421,11 @@ uv pip show [OPTIONS] [PACKAGE]...

    Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.

    May also be set with the UV_NO_CONFIG environment variable.

    +
    --no-managed-python

    Disable use of uv-managed Python versions.

    + +

    Instead, uv will search for a suitable Python version on the system.

    + +

    May also be set with the UV_NO_MANAGED_PYTHON environment variable.

    --no-progress

    Hide all progress outputs.

    For example, spinners or progress bars.

    @@ -7589,22 +7455,6 @@ uv pip show [OPTIONS] [PACKAGE]...

    See uv python for details on Python discovery and supported request formats.

    May also be set with the UV_PYTHON environment variable.

    -
    --python-preference python-preference

    Whether to prefer uv-managed or system Python installations.

    - -

    By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.

    - -

    May also be set with the UV_PYTHON_PREFERENCE environment variable.

    -

    Possible values:

    - -
      -
    • only-managed: Only use managed Python installations; never use system Python installations
    • - -
    • managed: Prefer managed Python installations over system Python installations
    • - -
    • system: Prefer system Python installations over managed Python installations
    • - -
    • only-system: Only use system Python installations; never use managed Python installations
    • -
    --quiet, -q

    Do not print any output

    --strict

    Validate the Python environment, to detect packages with missing dependencies and other issues

    @@ -7751,6 +7601,11 @@ uv pip tree [OPTIONS]
  • subprocess: Use the keyring command for credential lookup
  • +
    --managed-python

    Require use of uv-managed Python versions.

    + +

    By default, uv prefers using Python versions it manages. However, it will use system Python versions if a uv-managed Python is not installed. This option disables use of system Python versions.

    + +

    May also be set with the UV_MANAGED_PYTHON environment variable.

    --native-tls

    Whether to load TLS certificates from the platform’s native certificate store.

    By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).

    @@ -7770,6 +7625,11 @@ uv pip tree [OPTIONS]
    --no-index

    Ignore the registry index (e.g., PyPI), instead relying on direct URL dependencies and those provided via --find-links

    +
    --no-managed-python

    Disable use of uv-managed Python versions.

    + +

    Instead, uv will search for a suitable Python version on the system.

    + +

    May also be set with the UV_NO_MANAGED_PYTHON environment variable.

    --no-progress

    Hide all progress outputs.

    For example, spinners or progress bars.

    @@ -7805,22 +7665,6 @@ uv pip tree [OPTIONS]

    See uv python for details on Python discovery and supported request formats.

    May also be set with the UV_PYTHON environment variable.

    -
    --python-preference python-preference

    Whether to prefer uv-managed or system Python installations.

    - -

    By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.

    - -

    May also be set with the UV_PYTHON_PREFERENCE environment variable.

    -

    Possible values:

    - -
      -
    • only-managed: Only use managed Python installations; never use system Python installations
    • - -
    • managed: Prefer managed Python installations over system Python installations
    • - -
    • system: Prefer system Python installations over managed Python installations
    • - -
    • only-system: Only use system Python installations; never use managed Python installations
    • -
    --quiet, -q

    Do not print any output

    --show-version-specifiers

    Show the version constraint(s) imposed on each package

    @@ -7896,6 +7740,11 @@ uv pip check [OPTIONS]
    --help, -h

    Display the concise help for this command

    +
    --managed-python

    Require use of uv-managed Python versions.

    + +

    By default, uv prefers using Python versions it manages. However, it will use system Python versions if a uv-managed Python is not installed. This option disables use of system Python versions.

    + +

    May also be set with the UV_MANAGED_PYTHON environment variable.

    --native-tls

    Whether to load TLS certificates from the platform’s native certificate store.

    By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).

    @@ -7911,6 +7760,11 @@ uv pip check [OPTIONS]

    Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.

    May also be set with the UV_NO_CONFIG environment variable.

    +
    --no-managed-python

    Disable use of uv-managed Python versions.

    + +

    Instead, uv will search for a suitable Python version on the system.

    + +

    May also be set with the UV_NO_MANAGED_PYTHON environment variable.

    --no-progress

    Hide all progress outputs.

    For example, spinners or progress bars.

    @@ -7940,22 +7794,6 @@ uv pip check [OPTIONS]

    See uv python for details on Python discovery and supported request formats.

    May also be set with the UV_PYTHON environment variable.

    -
    --python-preference python-preference

    Whether to prefer uv-managed or system Python installations.

    - -

    By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.

    - -

    May also be set with the UV_PYTHON_PREFERENCE environment variable.

    -

    Possible values:

    - -
      -
    • only-managed: Only use managed Python installations; never use system Python installations
    • - -
    • managed: Prefer managed Python installations over system Python installations
    • - -
    • system: Prefer system Python installations over managed Python installations
    • - -
    • only-system: Only use system Python installations; never use managed Python installations
    • -
    --quiet, -q

    Do not print any output

    --system

    Check packages in the system Python environment.

    @@ -8137,6 +7975,11 @@ uv venv [OPTIONS] [PATH]
  • symlink: Symbolically link packages from the wheel into the site-packages directory
  • +
    --managed-python

    Require use of uv-managed Python versions.

    + +

    By default, uv prefers using Python versions it manages. However, it will use system Python versions if a uv-managed Python is not installed. This option disables use of system Python versions.

    + +

    May also be set with the UV_MANAGED_PYTHON environment variable.

    --native-tls

    Whether to load TLS certificates from the platform’s native certificate store.

    By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).

    @@ -8154,6 +7997,11 @@ uv venv [OPTIONS] [PATH]

    May also be set with the UV_NO_CONFIG environment variable.

    --no-index

    Ignore the registry index (e.g., PyPI), instead relying on direct URL dependencies and those provided via --find-links

    +
    --no-managed-python

    Disable use of uv-managed Python versions.

    + +

    Instead, uv will search for a suitable Python version on the system.

    + +

    May also be set with the UV_NO_MANAGED_PYTHON environment variable.

    --no-progress

    Hide all progress outputs.

    For example, spinners or progress bars.

    @@ -8193,22 +8041,6 @@ uv venv [OPTIONS] [PATH]

    See uv python for details on Python discovery and supported request formats.

    May also be set with the UV_PYTHON environment variable.

    -
    --python-preference python-preference

    Whether to prefer uv-managed or system Python installations.

    - -

    By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.

    - -

    May also be set with the UV_PYTHON_PREFERENCE environment variable.

    -

    Possible values:

    - -
      -
    • only-managed: Only use managed Python installations; never use system Python installations
    • - -
    • managed: Prefer managed Python installations over system Python installations
    • - -
    • system: Prefer system Python installations over managed Python installations
    • - -
    • only-system: Only use system Python installations; never use managed Python installations
    • -
    --quiet, -q

    Do not print any output

    --refresh

    Refresh all cached data

    @@ -8427,6 +8259,11 @@ uv build [OPTIONS] [SRC]
  • symlink: Symbolically link packages from the wheel into the site-packages directory
  • +
    --managed-python

    Require use of uv-managed Python versions.

    + +

    By default, uv prefers using Python versions it manages. However, it will use system Python versions if a uv-managed Python is not installed. This option disables use of system Python versions.

    + +

    May also be set with the UV_MANAGED_PYTHON environment variable.

    --native-tls

    Whether to load TLS certificates from the platform’s native certificate store.

    By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).

    @@ -8471,6 +8308,11 @@ uv build [OPTIONS] [SRC]

    May also be set with the UV_NO_CONFIG environment variable.

    --no-index

    Ignore the registry index (e.g., PyPI), instead relying on direct URL dependencies and those provided via --find-links

    +
    --no-managed-python

    Disable use of uv-managed Python versions.

    + +

    Instead, uv will search for a suitable Python version on the system.

    + +

    May also be set with the UV_NO_MANAGED_PYTHON environment variable.

    --no-progress

    Hide all progress outputs.

    For example, spinners or progress bars.

    @@ -8535,22 +8377,6 @@ uv build [OPTIONS] [SRC]

    See uv python to view supported request formats.

    May also be set with the UV_PYTHON environment variable.

    -
    --python-preference python-preference

    Whether to prefer uv-managed or system Python installations.

    - -

    By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.

    - -

    May also be set with the UV_PYTHON_PREFERENCE environment variable.

    -

    Possible values:

    - -
      -
    • only-managed: Only use managed Python installations; never use system Python installations
    • - -
    • managed: Prefer managed Python installations over system Python installations
    • - -
    • system: Prefer system Python installations over managed Python installations
    • - -
    • only-system: Only use system Python installations; never use managed Python installations
    • -
    --quiet, -q

    Do not print any output

    --refresh

    Refresh all cached data

    @@ -8696,6 +8522,11 @@ With these settings, the following two calls are equivalent:
  • subprocess: Use the keyring command for credential lookup
  • +
    --managed-python

    Require use of uv-managed Python versions.

    + +

    By default, uv prefers using Python versions it manages. However, it will use system Python versions if a uv-managed Python is not installed. This option disables use of system Python versions.

    + +

    May also be set with the UV_MANAGED_PYTHON environment variable.

    --native-tls

    Whether to load TLS certificates from the platform’s native certificate store.

    By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).

    @@ -8711,6 +8542,11 @@ With these settings, the following two calls are equivalent:

    Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.

    May also be set with the UV_NO_CONFIG environment variable.

    +
    --no-managed-python

    Disable use of uv-managed Python versions.

    + +

    Instead, uv will search for a suitable Python version on the system.

    + +

    May also be set with the UV_NO_MANAGED_PYTHON environment variable.

    --no-progress

    Hide all progress outputs.

    For example, spinners or progress bars.

    @@ -8743,22 +8579,6 @@ With these settings, the following two calls are equivalent:

    Defaults to PyPI’s publish URL (<https://upload.pypi.org/legacy/>).

    May also be set with the UV_PUBLISH_URL environment variable.

    -
    --python-preference python-preference

    Whether to prefer uv-managed or system Python installations.

    - -

    By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.

    - -

    May also be set with the UV_PYTHON_PREFERENCE environment variable.

    -

    Possible values:

    - -
      -
    • only-managed: Only use managed Python installations; never use system Python installations
    • - -
    • managed: Prefer managed Python installations over system Python installations
    • - -
    • system: Prefer system Python installations over managed Python installations
    • - -
    • only-system: Only use system Python installations; never use managed Python installations
    • -
    --quiet, -q

    Do not print any output

    --token, -t token

    The token for the upload.

    @@ -8870,6 +8690,11 @@ uv cache clean [OPTIONS] [PACKAGE]...
    --help, -h

    Display the concise help for this command

    +
    --managed-python

    Require use of uv-managed Python versions.

    + +

    By default, uv prefers using Python versions it manages. However, it will use system Python versions if a uv-managed Python is not installed. This option disables use of system Python versions.

    + +

    May also be set with the UV_MANAGED_PYTHON environment variable.

    --native-tls

    Whether to load TLS certificates from the platform’s native certificate store.

    By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).

    @@ -8885,6 +8710,11 @@ uv cache clean [OPTIONS] [PACKAGE]...

    Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.

    May also be set with the UV_NO_CONFIG environment variable.

    +
    --no-managed-python

    Disable use of uv-managed Python versions.

    + +

    Instead, uv will search for a suitable Python version on the system.

    + +

    May also be set with the UV_NO_MANAGED_PYTHON environment variable.

    --no-progress

    Hide all progress outputs.

    For example, spinners or progress bars.

    @@ -8907,22 +8737,6 @@ uv cache clean [OPTIONS] [PACKAGE]...

    This setting has no effect when used in the uv pip interface.

    -
    --python-preference python-preference

    Whether to prefer uv-managed or system Python installations.

    - -

    By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.

    - -

    May also be set with the UV_PYTHON_PREFERENCE environment variable.

    -

    Possible values:

    - -
      -
    • only-managed: Only use managed Python installations; never use system Python installations
    • - -
    • managed: Prefer managed Python installations over system Python installations
    • - -
    • system: Prefer system Python installations over managed Python installations
    • - -
    • only-system: Only use system Python installations; never use managed Python installations
    • -
    --quiet, -q

    Do not print any output

    --verbose, -v

    Use verbose output.

    @@ -8993,6 +8807,11 @@ uv cache prune [OPTIONS]
    --help, -h

    Display the concise help for this command

    +
    --managed-python

    Require use of uv-managed Python versions.

    + +

    By default, uv prefers using Python versions it manages. However, it will use system Python versions if a uv-managed Python is not installed. This option disables use of system Python versions.

    + +

    May also be set with the UV_MANAGED_PYTHON environment variable.

    --native-tls

    Whether to load TLS certificates from the platform’s native certificate store.

    By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).

    @@ -9008,6 +8827,11 @@ uv cache prune [OPTIONS]

    Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.

    May also be set with the UV_NO_CONFIG environment variable.

    +
    --no-managed-python

    Disable use of uv-managed Python versions.

    + +

    Instead, uv will search for a suitable Python version on the system.

    + +

    May also be set with the UV_NO_MANAGED_PYTHON environment variable.

    --no-progress

    Hide all progress outputs.

    For example, spinners or progress bars.

    @@ -9030,22 +8854,6 @@ uv cache prune [OPTIONS]

    This setting has no effect when used in the uv pip interface.

    -
    --python-preference python-preference

    Whether to prefer uv-managed or system Python installations.

    - -

    By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.

    - -

    May also be set with the UV_PYTHON_PREFERENCE environment variable.

    -

    Possible values:

    - -
      -
    • only-managed: Only use managed Python installations; never use system Python installations
    • - -
    • managed: Prefer managed Python installations over system Python installations
    • - -
    • system: Prefer system Python installations over managed Python installations
    • - -
    • only-system: Only use system Python installations; never use managed Python installations
    • -
    --quiet, -q

    Do not print any output

    --verbose, -v

    Use verbose output.

    @@ -9118,6 +8926,11 @@ uv cache dir [OPTIONS]
    --help, -h

    Display the concise help for this command

    +
    --managed-python

    Require use of uv-managed Python versions.

    + +

    By default, uv prefers using Python versions it manages. However, it will use system Python versions if a uv-managed Python is not installed. This option disables use of system Python versions.

    + +

    May also be set with the UV_MANAGED_PYTHON environment variable.

    --native-tls

    Whether to load TLS certificates from the platform’s native certificate store.

    By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).

    @@ -9133,6 +8946,11 @@ uv cache dir [OPTIONS]

    Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.

    May also be set with the UV_NO_CONFIG environment variable.

    +
    --no-managed-python

    Disable use of uv-managed Python versions.

    + +

    Instead, uv will search for a suitable Python version on the system.

    + +

    May also be set with the UV_NO_MANAGED_PYTHON environment variable.

    --no-progress

    Hide all progress outputs.

    For example, spinners or progress bars.

    @@ -9155,22 +8973,6 @@ uv cache dir [OPTIONS]

    This setting has no effect when used in the uv pip interface.

    -
    --python-preference python-preference

    Whether to prefer uv-managed or system Python installations.

    - -

    By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.

    - -

    May also be set with the UV_PYTHON_PREFERENCE environment variable.

    -

    Possible values:

    - -
      -
    • only-managed: Only use managed Python installations; never use system Python installations
    • - -
    • managed: Prefer managed Python installations over system Python installations
    • - -
    • system: Prefer system Python installations over managed Python installations
    • - -
    • only-system: Only use system Python installations; never use managed Python installations
    • -
    --quiet, -q

    Do not print any output

    --verbose, -v

    Use verbose output.

    @@ -9257,6 +9059,11 @@ uv self update [OPTIONS] [TARGET_VERSION]
    --help, -h

    Display the concise help for this command

    +
    --managed-python

    Require use of uv-managed Python versions.

    + +

    By default, uv prefers using Python versions it manages. However, it will use system Python versions if a uv-managed Python is not installed. This option disables use of system Python versions.

    + +

    May also be set with the UV_MANAGED_PYTHON environment variable.

    --native-tls

    Whether to load TLS certificates from the platform’s native certificate store.

    By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).

    @@ -9272,6 +9079,11 @@ uv self update [OPTIONS] [TARGET_VERSION]

    Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.

    May also be set with the UV_NO_CONFIG environment variable.

    +
    --no-managed-python

    Disable use of uv-managed Python versions.

    + +

    Instead, uv will search for a suitable Python version on the system.

    + +

    May also be set with the UV_NO_MANAGED_PYTHON environment variable.

    --no-progress

    Hide all progress outputs.

    For example, spinners or progress bars.

    @@ -9294,22 +9106,6 @@ uv self update [OPTIONS] [TARGET_VERSION]

    This setting has no effect when used in the uv pip interface.

    -
    --python-preference python-preference

    Whether to prefer uv-managed or system Python installations.

    - -

    By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.

    - -

    May also be set with the UV_PYTHON_PREFERENCE environment variable.

    -

    Possible values:

    - -
      -
    • only-managed: Only use managed Python installations; never use system Python installations
    • - -
    • managed: Prefer managed Python installations over system Python installations
    • - -
    • system: Prefer system Python installations over managed Python installations
    • - -
    • only-system: Only use system Python installations; never use managed Python installations
    • -
    --quiet, -q

    Do not print any output

    --token token

    A GitHub token for authentication. A token is not required but can be used to reduce the chance of encountering rate limits

    @@ -9377,6 +9173,11 @@ uv version [OPTIONS]
    --help, -h

    Display the concise help for this command

    +
    --managed-python

    Require use of uv-managed Python versions.

    + +

    By default, uv prefers using Python versions it manages. However, it will use system Python versions if a uv-managed Python is not installed. This option disables use of system Python versions.

    + +

    May also be set with the UV_MANAGED_PYTHON environment variable.

    --native-tls

    Whether to load TLS certificates from the platform’s native certificate store.

    By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).

    @@ -9392,6 +9193,11 @@ uv version [OPTIONS]

    Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.

    May also be set with the UV_NO_CONFIG environment variable.

    +
    --no-managed-python

    Disable use of uv-managed Python versions.

    + +

    Instead, uv will search for a suitable Python version on the system.

    + +

    May also be set with the UV_NO_MANAGED_PYTHON environment variable.

    --no-progress

    Hide all progress outputs.

    For example, spinners or progress bars.

    @@ -9414,22 +9220,6 @@ uv version [OPTIONS]

    This setting has no effect when used in the uv pip interface.

    -
    --python-preference python-preference

    Whether to prefer uv-managed or system Python installations.

    - -

    By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.

    - -

    May also be set with the UV_PYTHON_PREFERENCE environment variable.

    -

    Possible values:

    - -
      -
    • only-managed: Only use managed Python installations; never use system Python installations
    • - -
    • managed: Prefer managed Python installations over system Python installations
    • - -
    • system: Prefer system Python installations over managed Python installations
    • - -
    • only-system: Only use system Python installations; never use managed Python installations
    • -
    --quiet, -q

    Do not print any output

    --verbose, -v

    Use verbose output.

    @@ -9473,6 +9263,16 @@ uv generate-shell-completion [OPTIONS]

    See --project to only change the project root directory.

    +
    --managed-python

    Require use of uv-managed Python versions.

    + +

    By default, uv prefers using Python versions it manages. However, it will use system Python versions if a uv-managed Python is not installed. This option disables use of system Python versions.

    + +

    May also be set with the UV_MANAGED_PYTHON environment variable.

    +
    --no-managed-python

    Disable use of uv-managed Python versions.

    + +

    Instead, uv will search for a suitable Python version on the system.

    + +

    May also be set with the UV_NO_MANAGED_PYTHON environment variable.

    --project project

    Run the command within the given project directory.

    All pyproject.toml, uv.toml, and .python-version files will be discovered by walking up the directory tree from the project root, as will the project’s virtual environment (.venv).

    @@ -9543,6 +9343,11 @@ uv help [OPTIONS] [COMMAND]...
    --help, -h

    Display the concise help for this command

    +
    --managed-python

    Require use of uv-managed Python versions.

    + +

    By default, uv prefers using Python versions it manages. However, it will use system Python versions if a uv-managed Python is not installed. This option disables use of system Python versions.

    + +

    May also be set with the UV_MANAGED_PYTHON environment variable.

    --native-tls

    Whether to load TLS certificates from the platform’s native certificate store.

    By default, uv loads certificates from the bundled webpki-roots crate. The webpki-roots are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).

    @@ -9558,6 +9363,11 @@ uv help [OPTIONS] [COMMAND]...

    Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.

    May also be set with the UV_NO_CONFIG environment variable.

    +
    --no-managed-python

    Disable use of uv-managed Python versions.

    + +

    Instead, uv will search for a suitable Python version on the system.

    + +

    May also be set with the UV_NO_MANAGED_PYTHON environment variable.

    --no-pager

    Disable pager when printing help

    --no-progress

    Hide all progress outputs.

    @@ -9582,22 +9392,6 @@ uv help [OPTIONS] [COMMAND]...

    This setting has no effect when used in the uv pip interface.

    -
    --python-preference python-preference

    Whether to prefer uv-managed or system Python installations.

    - -

    By default, uv prefers using Python versions it manages. However, it will use system Python installations if a uv-managed Python is not installed. This option allows prioritizing or ignoring system Python installations.

    - -

    May also be set with the UV_PYTHON_PREFERENCE environment variable.

    -

    Possible values:

    - -
      -
    • only-managed: Only use managed Python installations; never use system Python installations
    • - -
    • managed: Prefer managed Python installations over system Python installations
    • - -
    • system: Prefer system Python installations over managed Python installations
    • - -
    • only-system: Only use system Python installations; never use managed Python installations
    • -
    --quiet, -q

    Do not print any output

    --verbose, -v

    Use verbose output.