Skip to content

Qwen3.8-Flash-Next on any consumer hardware: one-click install for Windows / Linux. Strata inference engine, OpenAI/Anthropic API on localhost, optional image input.

C++

Fix Windows PermissionError in get_llama_cpp() by using shutil.move instead of pathlib.replace

Alfirb45c40be6a8e
diff --git a/setup.py b/setup.py
index 1122c3630..fc2cc2270 100644
--- a/setup.py
+++ b/setup.py
@@ -404,7 +404,9 @@ def get_llama_cpp():
f.extractall(tmp)
top = next(tmp.iterdir())
shutil.rmtree(llama, ignore_errors=True)
- top.replace(llama)
+ # pathlib.Path.replace() can fail on Windows with PermissionError
+ # when file handles or AV locks persist; use shutil.move instead.
+ shutil.move(str(top), str(llama.parent))
shutil.rmtree(tmp, ignore_errors=True)
z.unlink(missing_ok=True)
z.with_name(z.name + ".done").unlink(missing_ok=True)