From d0a7ce9abf690fe6f6ff77d31de8d4942f840787 Mon Sep 17 00:00:00 2001 From: Mug <> Date: Mon, 10 Apr 2023 17:12:25 +0200 Subject: [PATCH] Make windows users happy (hopefully) --- examples/llama_cpp.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/llama_cpp.py b/examples/llama_cpp.py index 89eca4bb7..1611e1635 100644 --- a/examples/llama_cpp.py +++ b/examples/llama_cpp.py @@ -38,7 +38,9 @@ def _load_shared_library(lib_base_name): if ("LLAMA_CPP_LIB" in os.environ): lib_base_name = os.environ["LLAMA_CPP_LIB"] - _lib_paths = [pathlib.Path(os.environ["LLAMA_CPP_LIB"]).resolve()] + _lib = pathlib.Path(lib_base_name) + _base_path = _lib.parent.resolve() + _lib_paths = [_lib.resolve()] # Add the library directory to the DLL search path on Windows (if needed) if sys.platform == "win32" and sys.version_info >= (3, 8):