Skip to content

Commit ee71ce8

Browse files
author
Mug
committed
Make windows users happy (hopefully)
1 parent cf339c9 commit ee71ce8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

llama_cpp/llama_cpp.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ def _load_shared_library(lib_base_name):
2727

2828
if ("LLAMA_LIB" in os.environ):
2929
lib_base_name = os.environ["LLAMA_LIB"]
30-
_lib_paths = [pathlib.Path(os.environ["LLAMA_LIB"]).resolve()]
30+
_lib = pathlib.Path(lib_base_name)
31+
_base_path = _lib.parent.resolve()
32+
_lib_paths = [_lib.resolve()]
3133

3234
# Add the library directory to the DLL search path on Windows (if needed)
3335
if sys.platform == "win32" and sys.version_info >= (3, 8):

0 commit comments

Comments
 (0)