diff --git a/modules/terminal_ops/run.py b/modules/terminal_ops/run.py index 95f457c..b8e5746 100644 --- a/modules/terminal_ops/run.py +++ b/modules/terminal_ops/run.py @@ -414,12 +414,15 @@ class RunMixin: execution_in_container = self._will_use_container(session_override) python_rewrite = self.container_python_cmd if execution_in_container else self.python_cmd pip_rewrite = self._derive_pip_from_python(python_rewrite) - # 统一替换 python/python3,为保障虚拟环境命中只替换独立单词 - if re.search(r"\bpython3?\b", command): - command = re.sub(r"\bpython3?\b", python_rewrite, command) - # 同步替换 pip/pip3,确保指向同一环境 - if re.search(r"(?