From 2424807f3c2dabe131b98951763faa6674cd989d Mon Sep 17 00:00:00 2001 From: Ryan Kurtz Date: Thu, 13 Aug 2026 09:09:24 -0400 Subject: [PATCH] GP-0: Minor change to pyghidra_launcher.py to better find python in a virtual environment on MSYS2 (#9496) --- Ghidra/Features/PyGhidra/support/pyghidra_launcher.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Ghidra/Features/PyGhidra/support/pyghidra_launcher.py b/Ghidra/Features/PyGhidra/support/pyghidra_launcher.py index 965b610124..b5d3371103 100644 --- a/Ghidra/Features/PyGhidra/support/pyghidra_launcher.py +++ b/Ghidra/Features/PyGhidra/support/pyghidra_launcher.py @@ -125,9 +125,9 @@ def is_externally_managed() -> bool: return marker.is_file() def get_venv_exe(venv_dir: Path) -> List[str]: - win_python_cmd: str = str(venv_dir / 'Scripts' / 'python.exe') - linux_python_cmd: str = str(venv_dir / 'bin' / 'python3') - return [win_python_cmd] if platform.system() == 'Windows' else [linux_python_cmd] + win_python_path: Path = venv_dir / 'Scripts' / 'python.exe' + linux_python_path: Path = venv_dir / 'bin' / 'python3' # also used by MSYS2 on Windows + return [str(win_python_path)] if win_python_path.exists() else [str(linux_python_path)] def get_ghidra_venv(install_dir: Path, dev: bool) -> Path: return (install_dir / 'build' if dev else get_user_settings_dir(install_dir, dev)) / 'venv'