executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
install-and-runtimeInstall Pyserini, select Python/Java/Torch/Faiss/runtime options, and diagnose import, JVM, and optional dependency failures.
Independent GitHub snapshot · Automated classification · Original documentation governs
Use this sub-skill when the task is about installing Pyserini, preparing a safe runtime environment, or diagnosing failures before an indexing, search, dense retrieval, evaluation, REST, or MCP workflow can start.
Natural triggers include install Pyserini, Python version errors, Java/JVM errors, pyjnius failures, No matching jar file found, missing faiss, Torch/CUDA mismatch, source checkout setup, pip check conflicts, or REST/MCP imports failing before a server starts.
>=3.12, but the project is built and documented around Python 3.12 with Java 21.faiss-cpu, a conda Faiss package, or a GPU build that matches their platform.python3.12 -m venv .venv
. .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install pyserini==2.3.0
python -m pip check
If the user wants a current PyPI release instead of the repo-matched version, omit the version pin after confirming reproducibility is not required.
conda create -n pyserini python=3.12 -y
conda activate pyserini
conda install -c conda-forge openjdk=21 -y
python -m pip install --upgrade pip
python -m pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
python -m pip install pyserini==2.3.0
For CUDA, replace the CPU Torch command with the PyTorch command matching the machine's CUDA runtime. Do not install CUDA wheels just because Pyserini imports; install them only for GPU encoding/search tasks.
python -m pip install faiss-cpu
python -m pip check
If faiss-cpu wheels are unavailable or the user needs GPU Faiss, prefer a conda/mamba environment with a platform-compatible Faiss package. After installing Faiss, run the bundled checker with --check-faiss.
python -m pip install 'pyserini[optional]'
Use the optional extra only when the user asks for the optional multimodal/UniIR paths. Core Lucene search, most dense setup, evaluation, REST, and MCP setup do not require the extra.
python3.12 -m venv .venv
. .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -e .
python -m pip check
A source checkout can import the Python package while still failing Lucene-backed imports if package resources are missing. Source-development setup may also require the evaluation tools submodule and an Anserini fatjar; see ../repo-development/SKILL.md for maintainer build/test workflows.
Run the bundled checker from this sub-skill directory or copy it into the target environment:
python scripts/check_pyserini_runtime.py --help
python scripts/check_pyserini_runtime.py
python scripts/check_pyserini_runtime.py --check-lucene
python scripts/check_pyserini_runtime.py --check-faiss --check-server
Interpretation:
--check-lucene starts the Java-backed Lucene import path and catches missing Java, PyJNIus, and Anserini fatjar problems.--check-faiss verifies the optional Faiss Python package and Pyserini Faiss search import path.--check-server verifies REST/MCP import dependencies without binding ports or opening indexes.Use references/runtime-requirements.md for dependency choices and source checkout caveats. Use references/troubleshooting.md for symptom-to-recovery guidance.
../index-search-fetch/SKILL.md.../dense-encoding/SKILL.md.../evaluation-and-fusion/SKILL.md.../serving-and-agent-tools/SKILL.md.../repo-development/SKILL.md.