oobabooga/textgen · error · ImportError
--ik requires the ik_llama_cpp_binaries package. Install it
Error message
--ik requires the ik_llama_cpp_binaries package. Install it with: pip install <ik_llama_cpp_binaries wheel URL>
What it means
Error "--ik requires the ik_llama_cpp_binaries package. Install it with: pip install <ik_llama_cpp_binaries wheel URL>" thrown in oobabooga/textgen.
Source
Thrown at modules/llama_cpp_server.py:423
"""Find an available port, preferring main port + 5."""
preferred_port = shared.args.api_port + 5
if self._is_port_available(preferred_port):
return preferred_port
# Fall back to OS-assigned random port
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
s.bind(('', 0))
return s.getsockname()[1]
def _start_server(self):
"""Start the llama.cpp server and wait until it's ready."""
# Determine the server path
if self.server_path is None:
if shared.args.ik:
try:
import ik_llama_cpp_binaries
except ImportError:
raise ImportError("--ik requires the ik_llama_cpp_binaries package. Install it with: pip install <ik_llama_cpp_binaries wheel URL>")
self.server_path = ik_llama_cpp_binaries.get_binary_path()
else:
import llama_cpp_binaries
self.server_path = llama_cpp_binaries.get_binary_path()
# Build the command
cmd = [
self.server_path,
"--model", self.model_path,
"--batch-size", str(shared.args.batch_size),
"--ubatch-size", str(shared.args.ubatch_size),
"--port", str(self.port),
"--no-webui",
"--flash-attn", "on",
]
if shared.args.ctx_size < 0:View on GitHub (pinned to ed888c71f2)
Solutions
- Install the ik_llama_cpp_binaries package with: pip install <ik_llama_cpp_binaries wheel URL>.
- Remove the --ik flag to use the standard llama.cpp loader instead.
When it happens
Trigger: Raised at startup/model-load when the --ik flag (ik_llama.cpp backend) is used but the ik_llama_cpp_binaries package is not installed. Install it with: pip install <ik_llama_cpp_binaries wheel URL>.
Common situations: See trigger scenarios.
AI-assisted analysis of oobabooga/textgen@ed888c71f2 (2026-08-15).
Data as JSON: /api/errors/2ffe662b3ea23ee7.
Report an issue: GitHub.