diff --git a/python/ray/_private/runtime_env/uv.py b/python/ray/_private/runtime_env/uv.py index 369e1c599c99..78d4ad2c55f4 100644 --- a/python/ray/_private/runtime_env/uv.py +++ b/python/ray/_private/runtime_env/uv.py @@ -96,7 +96,6 @@ def _get_uv_exec_to_install() -> str: "install", "--disable-pip-version-check", "--no-cache-dir", - "--force-reinstall", _get_uv_exec_to_install(), ] logger.info("Installing package uv to %s", virtualenv_path) @@ -154,11 +153,6 @@ async def _install_uv_packages( uv_exists = await self._check_uv_existence(python, cwd, pip_env, logger) # Install uv, which acts as the default package manager. - # - # TODO(hjiang): If `uv` in virtual env perfectly matches the version users - # require, we don't need to install also. It requires a different - # implementation to execute and check existence. Here we take the simpliest - # implementation, always reinstall the required version. if (not uv_exists) or (self._uv_config.get("uv_version", None) is not None): await self._install_uv(path, cwd, pip_env, logger)