Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7b136bb

Browse filesBrowse files
authored
Fix for shared library not found and compile issues in Windows (abetlen#848)
* fix windows library dll name issue * Updated README.md Windows instructions * Update llama_cpp.py to handle different windows dll file versions
1 parent eefd76f commit 7b136bb
Copy full SHA for 7b136bb

File tree

Expand file treeCollapse file tree

2 files changed

+7
-0
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+7
-0
lines changed

‎README.md

Copy file name to clipboardExpand all lines: README.md
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,12 @@ Then, call `pip` after setting the variables:
9292
pip install llama-cpp-python
9393
```
9494

95+
If you run into issues where it complains it can't find `'nmake'` `'?'` or CMAKE_C_COMPILER, you can extract w64devkit as [mentioned in llama.cpp repo](https://github.com/ggerganov/llama.cpp#openblas) and add those manually to CMAKE_ARGS before running `pip` install:
96+
```ps
97+
$env:CMAKE_GENERATOR = "MinGW Makefiles"
98+
$env:CMAKE_ARGS = "-DLLAMA_OPENBLAS=on -DCMAKE_C_COMPILER=C:/w64devkit/bin/gcc.exe -DCMAKE_CXX_COMPILER=C:/w64devkit/bin/g++.exe"
99+
```
100+
95101
See the above instructions and set `CMAKE_ARGS` to the BLAS backend you want to use.
96102

97103
#### MacOS remarks

‎llama_cpp/llama_cpp.py

Copy file name to clipboardExpand all lines: llama_cpp/llama_cpp.py
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ def _load_shared_library(lib_base_name: str):
4242
elif sys.platform == "win32":
4343
_lib_paths += [
4444
_base_path / f"{lib_base_name}.dll",
45+
_base_path / f"lib{lib_base_name}.dll",
4546
]
4647
else:
4748
raise RuntimeError("Unsupported platform")

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.