A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.
Python artificial-intelligencedagdata-sciencedata-visualizationdataflowdeveloper-toolsmachine-learningnotebookspipelinepythonreactivesqlweb-app
Add uv version to `marimo env` output (#8157)
Trevor Manz3720aaf2a08a
diff --git a/marimo/_cli/envinfo.py b/marimo/_cli/envinfo.pyindex b8c1716edc..1eb5014310 100644--- a/marimo/_cli/envinfo.py+++ b/marimo/_cli/envinfo.py@@ -13,6 +13,7 @@ from marimo._utils.health import (get_node_version,get_optional_modules_list,get_required_modules_list,+ get_uv_version,)from marimo._utils.versions import is_editablefrom marimo._version import __version__@@ -98,6 +99,7 @@ def get_system_info() -> dict[str, Union[str, bool, dict[str, Any]]]:# back-filled in frontend"Browser": get_chrome_version() or "--","Node": get_node_version() or "--",+ "uv": get_uv_version() or "--",}requirements = get_required_modules_list()diff --git a/marimo/_utils/health.py b/marimo/_utils/health.pyindex 6eea27d51f..59f483a4ad 100644--- a/marimo/_utils/health.py+++ b/marimo/_utils/health.py@@ -63,6 +63,28 @@ def get_node_version() -> Optional[str]:return None+def get_uv_version() -> Optional[str]:+ from marimo._utils.uv import find_uv_bin++ try:+ process = subprocess.Popen(+ [find_uv_bin(), "--version"],+ stdout=subprocess.PIPE,+ stderr=subprocess.PIPE,+ text=True,+ )+ stdout, stderr = communicate_with_timeout(process)+ if stderr:+ return None+ if stdout and (stripped := stdout.strip()):+ # `uv --version` outputs "uv X.Y.Z (hash date)"+ return stripped.removeprefix("uv ")+ else:+ return None+ except FileNotFoundError:+ return None++def get_required_modules_list() -> dict[str, str]:packages = ["click",