From dea1bf3d04bbf36f07afaf7254aa02858e50e7e1 Mon Sep 17 00:00:00 2001 From: Sam Date: Wed, 31 May 2023 13:44:36 -0400 Subject: [PATCH] Parse g++ version instead of using string matching (#72) --- webui.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webui.py b/webui.py index 4c2354d..c0cfadc 100644 --- a/webui.py +++ b/webui.py @@ -155,8 +155,8 @@ def update_dependencies(): # On some Linux distributions, g++ may not exist or be the wrong version to compile GPTQ-for-LLaMa if sys.platform.startswith("linux"): - gxx_output = run_cmd("g++ --version", environment=True, capture_output=True) - if gxx_output.returncode != 0 or b"g++ (GCC) 12" in gxx_output.stdout: + gxx_output = run_cmd("g++ -dumpfullversion -dumpversion", environment=True, capture_output=True) + if gxx_output.returncode != 0 or int(gxx_output.stdout.strip().split(b".")[0]) > 11: # Install the correct version of g++ run_cmd("conda install -y -k gxx_linux-64=11.2.0", environment=True)